| Operator | Name |
|---|---|
| + | Addition |
| - | Subtraction |
| * | Multiplication |
| / | Division |
| % | Modulo |
| ** | Exponentiation |
| Operator | Name |
|---|---|
| += | Addition Assignment |
| -= | Subtraction Assignment |
| *= | Multiplication Assignment |
| /= | Division Assignment |
| %= | Modulo Assignment |
| **= | Exponentiation Assignment |
| Operator | Name |
|---|---|
| == | Equal |
| === | Identical |
| != | Not Equal |
| <> | Not Equal |
| !== | Not Identical |
| < | Less Than |
| > | Greater Than |
| <= | Less Than or Equal to |
| >= | Greater Than or Equal to |
| <=> | Spaceship |
| Operator | Name |
|---|---|
| ++$x | Preincrement |
| $x++ | Postincrement |
| –$x | Predecrement |
| $x– | Postdecrement |
| Operator | Name | Description | ||
|---|---|---|---|---|
| && | Logical AND | $x && $y returns true if both $x and $y are true. |
||
| ll | Logical OR | $x || $y returns true if either $x or $y is true. |
||
| ! | Logical NOT | !$x returns true if $x is false, and false if $x is true. |
||
| and | Logical AND (alternative) | $x and $y returns true if both $x and $y are true. |
||
| or | Logical OR (alternative) | $x or $y returns true if either $x or $y is true. |
||
| [ | ]( | .md) xor | Logical XOR | $x xor $y returns true if either $x or $y is true, but not both. |