| Example | Name | Result |
|---|---|---|
| $a = $b | Assign | Assign value of $b to $a. |
| $a == $b | Equal | True if $a is equal to $b. |
| $a === $b | Identical | True if $a is equal to $b, and of same type. |
| $a != $b | Not equal | True if $a is not equal to $b. |
| $a !== $b | Not identical | True if $a is not equal to $b, or not of same type. |
| $a < $b | Less than | True if $a is strictly less than $b. |
| $a > $b | Greater than | True if $a is strictly greater than $b. |
| $a <= $b | Less than or equal to | True if $a is less than or equal to $b. |
| $a >= $b | Greater than or equal to | True if $a is greater than or equal to $b. |
| $a + $b | Addition | Sum of $a and $b. |
| $a - $b | Subtraction | Difference of $a and $b. |
| $a * $b | Multiplication | Product of $a and $b. |
| $a / $b | Division | Quotient of $a and $b. |
| $a % $b | Modulus | Remainder of $a divided by $b. |
| $a and $b | And | True if both $a and $b are true. |
| $a or $b | Or | True if either $a or $b is true. |
| $a xor $b | Xor | True if either $a or $b is true, but not both. |
| ! $a | Not | True if $a is not true. |
| $a && $b | And | True if both $a and $b are true. |
| $a || $b | Or | True if either $a or $b is true. |
PHP supports C-style pre- and post-increment and decrement operators
(e.g., "++$a;" does a pre increment)
and the conditional "?:" (or ternary) operator:
$output";