Logical operators - 'or' vs. '||' (double pipe) in PHP
The two different versions operate at different precedences:
http://www.php.net/manual/en/language.operators.precedence.php
The "spelled out" operators and
and or
have lower precedence, even lower than assignment, so you may use them to avoid having to write parentheses in so many places. For example:
$d=$a||$b and $c
is equivalent to ($d=$a||$b) && $c
They are also more readable in many contexts.