Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Use logical and descriptive names for your variables. Variables used in iterating loops, such as $i, $j, $k, etc., are exceptions to this rule. Variables should contain only lower-case lowercase letters, underscores, and numbers, and should start with a letter. Values true, false, and null should always be lower-caselowercase.

Warning
titleIncorrect
Code Block
languagephp
$foo = 365; // not descriptive
$days_in_non_leap_year = 365; // too long
$_year_days = 365; // starts with an underscore

...