true, false, and null
- Booleans (true and false) are to be used when possible, rather than numeric equivalents
Incorrect:
if($foo) $bar = 1;
Correct:
if($foo) $bar = true;
!
should be used when possible vs function calls
Incorrect:
if(empty($str)) $str = 'stuff';
Correct:
if(!$str) $str = 'stuff';