Guided Notes

Operators

Arithmetic, assignment, comparison (== vs ===), logical, string, null coalescing, spaceship, and ternary operators.

Arithmetic and assignment

Slide 1 / 5
OperatorMeaningExample
+ - * /Add, subtract, multiply, divide7 / 2 → 3.5
%Remainder7 % 2 → 1
**Power2 ** 10 → 1024
= += -= *= /= .=Assign / update$total += 5; $s .= "!";
++ --Increment / decrement$i++
← Numbers, Math & Constants