Den 2019-04-01 kl. 23:37, skrev Rowan Collins:
On 31/03/2019 14:50, Niklas Keller wrote:
An alternative to prevent mistakes in this regard is making this a
compile error and requiring parenthesis.
If we're going to changes any precedence in the language, please
please please can we look at the ternary operator associativity?
I think making it non-associative, so that you have to use parentheses
in "$a ? $b : $c ? $d : $e" would break very little code, in an
obvious way, and help with a major pain point people have with the
language.
Regards,
I recall that this was up for discussion a few years back for PHP 7.0, see:
https://marc.info/?l=php-internals&m=141851165925502
r//Björn L
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php