Fix wording in example

The evaluation order is irrelevant; what matters is the associativity.

This amends commit bcd666c7d0.
This commit is contained in:
Christoph M. Becker 2021-03-08 16:19:09 +01:00
parent bcd666c7d0
commit 80958298c0

View file

@ -1793,7 +1793,7 @@ if (empty($_POST['action'])) {
echo (true ? 'true' : false ? 't' : 'f');
// however, the actual output of the above is 't' prior to PHP 8.0.0
// this is because ternary expressions are evaluated from left to right
// this is because ternary expressions are left-associative
// the following is a more obvious version of the same code as above
echo ((true ? 'true' : false) ? 't' : 'f');