Logical Operator
Example b And (logical AND) TRUE if $a and $b are both TRUE. $a or $b Or (logical OR) TRUE, if either $a or $b is TRUE. $a xor $b Xor (logical exclusive OR) TRUE, if either $a or $b is TRUE, but not both at the same time.
! $a Not (logical not) TRUE, if $a is not TRUE.
$a && $b And (logical AND) TRUE, if $a and $b are both TRUE.
$a || $b Or (logical OR) TRUE, if either $a or $b is TRUE.
The reason why "AND" and "OR" have two different forms of operators is that the priorities of their operations are different (see Operator Priority).
Example #1 Logical Operator Example
The output of the above routine is similar to:
bool(true) bool(false) bool(false) bool(true)