mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Fix wording in example
The evaluation order is irrelevant; what matters is the associativity.
This amends commit bcd666c7d0
.
This commit is contained in:
parent
bcd666c7d0
commit
80958298c0
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue