The PHP coding standard does not cover how class names should be written. This leads to friction within the userland community that is now largely following the standard recommendation PSR-1 . Extending our current coding standard to cover edge cases about abbreviations and acronyms/initialisms would resolve any future discussion.

Extend the coding standard to explicitly specify how abbreviations and acronyms/initialisms are to be handled when writing user-level class names. The current rule is:





Good:

'Curl'

'FooBar'



Bad:

'foobar'

'foo_bar'



— CODING_STANDARD Classes should be given descriptive names. Avoid using abbreviations where possible. Each word in the class name should start with a capital letter, without underscore delimiters (CamelCaps starting with a capital letter). The class name should be prefixed with the name of the 'parent set' (e.g. the name of the extension)::Good:'Curl''FooBar'Bad:'foobar''foo_bar'

While it is stated that abbreviations should be avoided, it is silent on what to do if they are used; especially in the case of acronyms/initialisms. There are essentially three choices possible now:

PascalCase except Acronyms/Initialisms — which is how the majority of user-level class names are written, and it matches the approach of many other programming languages. Always PascalCase — which is basically what — which is basically what PSR-1 defines, however, it would make most of the currently existing user-level class names invalid. Do Nothing — which of course automatically means that any approach is allowed, and the community discussions around this topic will continue.