Manipulating bits within bytes
Comparing two values
Adding or subtracting 1
Different types of operators take a different number of operands:
Unary operators, such as incrementing
$a++) or negation (
-$a), take a single operand.
There is one ternary operator, which takes
x ? y : z. It’s a terse,
if statement that
chooses between two expressions, depending on the result of a third
one. This conditional operator takes three operands.
Parentheses, call, and member
Unary, bitwise, and logical