PHP Naming Convention > Variable Naming


  • Begin with a lowercase e.g. id, name.
  • If multiple words: start it with the lowercase letter followed by an uppercase letter e.g. emailAddress, firstName
  • Avoid using underscore or dash
  • Avoid one-character variables e.g. a, b
  • Cannot start with a number
$fullName = 'John Doe';
$emailAddress = '';


xthiago farbodsaraf