April 2026
Intermediate
1009 pages
34h 15m
English
Left or right? This simple question concerns the programmer not only at the crossroads, but also in his web application. Everything that could begin with an "if" is crying out for a case differentiation. If the user enters "XY", do this, but if they enter "AB", do that.
PHP offers three programming constructs for these basic checks and decisions: first, the if case distinction, which can be found in almost every current programming language; second, switch case, and third, match. We’ll discuss each in the following sections.
The if case distinction in its basic form consists of two important elements: a condition that is checked, and a statement block that is only executed if the condition is met. For the ...
Read now
Unlock full access