On Fri, Jul 24, 2020 at 1:32 PM Rowan Tommins <rowan.coll...@gmail.com> wrote:

> If anything, I would argue for making both of these into errors, if
> that's possible. I think the biggest risk with this kind of change is
> not existing code relying on the old behaviour, it is code relying on
> the *new* behaviour which is accidentally run on older versions of PHP.

I thought the proposal to turn unparenthesized use into a warning then
waiting for PHP9 to use the proper precedence was the right idea.
Nested ternaries with the proper precedence turn into lovely truth
tables, which isn't even an uncommon idiom in C.  I'd really not like
to feed /r/lolphp ammo by requiring the parens in all cases and
continuing to break the ternary operator in comparison with every
other language that has it.

--c

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

Reply via email to