Operators Summary
Arithmetic, assignment (+=, .=), comparison, logical (&&, ||, and, or), string (.) and increment operators. Mind precedence.
Example
$s = "a";
$s .= "b";
$n = 5; $n **= 2;
var_dump(true && false, true || false, !true);
echo $s, " ", $n;Result
bool(false) bool(true) bool(false) ab 25
Exercise
Join strings.
"a" "b"
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.