Coding guidelines

The following wrong guideline examples will result in notices about undefined variables.

Checking if a variable is set
Wrong
if ($_GET["id"]) {
...
}
Right
if (isset($_GET["id"])) {
...
}
Defining constants
Wrong
define(TABLE_USERS, "fundausers");
Right
define("TABLE_USERS", "fundausers");
Checking if a variable contains data
Wrong
if ($_GET["name"] != "") {
...
}
Right
if (!empty($_GET["name"])) {
...
}

Purely visual

Argument list
Wrong
doSomething("title text",1,200,getData());
Right
doSomething("title text", 1, 200, getData());
Seperate arguments by a space.

Ternary conditional operator
Wrong
$a = ($b)?$c:$d;
Right
$a = $b ? $c : $d;
Again spaces makes it easier to read the code and structure.

Miscellaneous
If statements requries brachets even though they only have one line statements.

Indenting is done using 4 spaces instead of tabs. Emacs and Vim setup for this.