DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

My PHP Naming Convention

06.22.2009
| 2316 views |
  • submit to reddit
        From: http://codex.gallery2.org/Gallery3:Coding_Standards

Files: lower_case
Classes: Proper_Case (nouns)
Variables: lower_case (short and meaningful)
Functions: lower_case (verbs), questions with 'is_' preffix (is_enabled)
Constants: UPPER_CASE
DB Tables: lower_case (pluralized nouns)
DB Fields: lower_case (singular). Dates with '_on' suffix, questions with 'is_' preffix, user related with '_by' suffix