Values, operators and control flow
The pieces every later lesson is built from: variables and constants, the scalar types and var_dump, strings and numbers, the operators and their precedence, then the branches and loops that decide what runs next.
2.1
Variables and constants
variables, how to name them, interpolation, and constants
Open
2.2
Types in PHP
scalar types, null, type juggling, and var_dump on any value
Open
2.3
Strings in PHP
single and double quotes, concatenation, heredoc, nowdoc and character access
Open
2.4
Numbers in PHP
integers, floats, math functions, and random numbers
Open
2.5
Operators
arithmetic, strict comparison, logic, and the precedence behind every expression
Open
2.6
if and else
if, elseif, early returns and guard clauses that flatten the nesting
Open
2.7
switch and match
the switch statement and the match expression, side by side
Open
2.8
Ternary, null coalescing and nullsafe
the ternary operator, null coalescing and the nullsafe operator
Open
2.9
Loops
for, foreach, while and do-while, and when each loop fits
Open