Expressions: Logical Operations
Logical And
Logical and can be used to evaluate two expressions using the &&
operator, followed by the expression to evaluate to the right.
$foo = $bar && $baz;
Logical Or
Logical or can be used to evaluate two expressions using the ||
operator, followed by the expression to evaluate to the right.
$foo = $bar || $baz;
Logical Not
Logical not can be used to evaluate an expression using the !
operator.
$foo = !$bar;