1. Home
  2. Docs
  3. PHP Style Guide
  4. Class and Method Naming

Class and Method Naming

Class names should always start with an uppercase letter. Multiple words should be separated with an underscore, and not CamelCased.

INCORRECT:

CORRECT:

Class methods should be entirely lowercased and named to clearly indicate their function, preferably including a verb. Try to avoid overly long and verbose names. Multiple words should be separated with an underscore.

INCORRECT:

CORRECT:

Was this article helpful to you? Yes No

How can we help?