I ask because I've seen a couple of OO PHP tutorials which do not adhere to this, but to me it just makes sense. It makes it easy to instantly see if a file is a class or not, if non-class files all use lowercase names.


2 Answers 2


This is a naming convention question and whilst it is a good meta question it seems to have been well covered with this StackOverflow question from Dec 2008.

Basically, some languages have prescribed naming conventions (e.g. Java) whereas others (the majority) have evolved and are mixed to the point of Programmer's Holy Wars.

  • 2
    To bad that link doesn't work anymore... that is why link answers are bad, even links to SO don't always stay live. Nov 14, 2014 at 18:30
  • I have added a WebArchive link to bring it back to life.
    – Chad
    Dec 12, 2016 at 15:46

My 2c:

If the language doesn't force any conventions, and this includes things like indentation (not just naming). Then the important thing is consistency. Consistency is far more important than the choice of a good convention.

The existing answer answers your actual question.


Not the answer you're looking for? Browse other questions tagged or ask your own question.