Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Suitmedia PHP Coding Style

Edwin Lunando
September 28, 2014

Suitmedia PHP Coding Style

The PHP coding guideline for Suitmedia developer

Edwin Lunando

September 28, 2014
Tweet

More Decks by Edwin Lunando

Other Decks in Technology

Transcript

  1. Spaces is Better than Tabs 4 spaces per indent All

    Editors have the same indent width Prettier code on Git
  2. No ?> In The End of File Only for file

    with all PHP codes Avoid additional new lines in generated document
  3. Position of Opening and Closing Braces Class and Function declaration

    in new line Control Structures in the same line
  4. Friendly Variable Names With Underscore Avoid $j, $i, $asd, $abc,

    $temp Use $join_table, $counter_product, $temp_collection