It need not be codified into law. It can be accomplished by way of a severe wealth disparity, a glass ceiling, stratification of housing, stratification of education, etc., and a legal system that treats upper class people significantly better than lower class ones. Everyone is technically a citizen subject to the same laws but in practice a different set of laws apply to you based on your wealth, occupation, connections, and what neighborhood you live in.
Edit: yes the US is a bit like this, but you can take it a lot further.