PHP
Logical Operators
Arithmetic Operators are used to Perform Arithmetic Operations on Numeric Values Such as addition, subtraction, multiplication and etc.
Operator | Name | Example | Result |
---|---|---|---|
and | AND | $a and $b | true if both $a and $b are true |
or | OR | $a or $b | true if either $a or $b is true |
xor | XOR | $a xor $b | true if either $a and $b is true, but not both true. |
&& | AND | $a && $b | true if both $a and $b are true |
|| | OR | $a || $b | true if either $a or $b is true. or both are true. |
! | NOT | !$a | True if $a is a false |