Oops, no-perator found. Have a joke instead.
arithmetic
bitwise
null coalescing
comparison
logical
$a || $b
Logical or
Check if any condition is truthy.
Tags
Related
{
selectOperator(operator.slug);
search = '';
}">
{
selectOperator(operator.slug);
search = '';
}" href="/operators/logical-or-alt">$a or $b {
selectOperator(operator.slug);
search = '';
}" href="/operators/logical-and">$a && $b {
selectOperator(operator.slug);
search = '';
}" href="/operators/logical-not">!$a
true || false; // true
false || false; // false
1 || 0; // true
0 || ''; // false
strings
What is this? Who are you!?
PHP Operators is a reference guide for operators old and new in the PHP programming language. We're SPATIE, a web development agency from Belgium. Besides client work we like to contribute to the open source community and make fun projects like this one.