Skip to content
On this page

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;

Licensed under either of the MIT License or the Apache License (Version 2.0), at your option.