Guided Notes
Operators
Arithmetic, assignment, comparison (== vs ===), logical, string, null coalescing, spaceship, and ternary operators.
Arithmetic and assignment
Slide 1 / 5| Operator | Meaning | Example |
|---|---|---|
| + - * / | Add, subtract, multiply, divide | 7 / 2 → 3.5 |
| % | Remainder | 7 % 2 → 1 |
| ** | Power | 2 ** 10 → 1024 |
| = += -= *= /= .= | Assign / update | $total += 5; $s .= "!"; |
| ++ -- | Increment / decrement | $i++ |
