Developer's Guide

Tags
1. An empty line has to be left after the PHP opening tag
2.
3. <?php
4.
5. require_once('my_file.inc.php');
6. The PHP ending tag is forbidden
Indentation
1. The tabulation character ("\t") is the only indentation character
allowed
2. Each indentation level must be represented by a single tabulation
character
3.
4. function foo($a)
5. {
6. if ($a == null)
7. return false;
8. [...]
9. }
Array
1. The array keyword must not be followed by a space
2.
3. array(17, 23, 42);
4. The indentation when too much datas are inside an array has to
follow the following
5.
6. $a = array(
7. 36 => $b,
8. $c => 'foo',
9. $d => array(17, 23, 42),
10. $e => array(
11. 0 => 'zero',
12. 1 => $one
13. )
14. );
Bloc
Brasses are prohibited when they define only one instruction or a
statement combination
if (!$result)
return false;
for ($i = 0; $i < 17; $i++)
if ($myArray[$i] == $value)
$result[] = $myArray[$i];
else
$failed++;