The conditional construction in the implementation from PHP if else is practically no different from the similar rules of other programming languages, and you will not have to expect any special differences for a long time.
In ancient times, the assignment operator in the Pascal language was ": =", while C / C ++ was confidently controlled by one "=". To this day, the PHP condition if else can use three "strange" options: "=", "==", "===". It is also strange to use the “$” symbol to denote a variable (JavaScript does fine without variable refinement characters). Meanwhile, the growing number of programmers using PHP everyday is the best evidence of the practicality of the language.
The essence of conditional construction
. , true false. . , - , , .
:
. , , «=» - «==», «==» «===» , «<» «>».
PHP if else - «» . $iA (=2) $iC (=6) scfAB(). $iC, 20 $iB.
«=», «==» «===»
PHP if else «=», , . , «=» «==» , , .
PHP if () else «==» «===». , . (, , ...) .
PHP if else , , .
, . -, (PHP - ), . -, .
PHP if else, switch case, , , .
, : «=» «==» - , ( ).
«$» . , PHP . «=» «==». - , - .
, PHP « » if else - , . , PHP: if () else - , «=» .
, «$» : «=», «==» «===» , - . , , . , , .
, , PHP if else «=» .
, , PHP if else , . , , , , .
- , , . , , , - .