What is the difference between StudlyCaps and CamelCase?

kta picture kta · Sep 23, 2015 · Viewed 27.6k times · Source

PSR suggests, method names MUST be declared in camelCase and class names MUST be declared in StudlyCaps.

Answer

Niels Keurentjes picture Niels Keurentjes · Sep 23, 2015

StudlyCaps, also known as PascalCase, implies that the first capital of each subword is capitalized. camelCase implies, like a camel, that the humps are in the middle, therefore the first letter is not capitalized.

Compare Microsoft's standards for .NET.

Other well known capitalization styles are snake_case, where all words are concatenated in lowercase with underscores, and kebab-case, which is identical but uses a hyphen.