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,

--
Rowan Collins
[IMSoP]


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to