Versions Compared

Key

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

...

  • In order to be autoloaded classes must:
    • use the file extenstion '.class.php'
    • be located in any of the following locations:
      • <base dir>/classes
      • <base dir>/*/classes
      • <base dir>/plugins/*/classes

Files

PHP files should only contain php code.

Variable names

Names should be descriptive, but also concise. Wherever possible, keep variable names to under 15 characters, although be prepared to sacrifice a few extra characters to improve clarity. There’s no hard and fast rule when it comes to the length of a variable name, so just try and be as concise as possible without affecting clarity too much. Generally speaking, the smaller the scope of a variable, the more concise you should be, so global variables will usually have the longest names (relative to all others) whereas variables local to a loop might have names consisting only of a single character.

...