Den 2019-04-09 kl. 11:54, skrev Nikita Popov:
Hi internals,

Inspired by Bob's recent RFC for concat precedence, I'd like to propose a
deprecation and removal of the left-associative behavior of ternaries.
Instead, explicit parentheses should be used:

https://wiki.php.net/rfc/ternary_associativity

This RFC makes nested ternaries without disambiguating parentheses an error
in PHP 8 -- we might want to consider making them right-associative
instead, which is both useful and matches the behavior of other languages.

Regards,
Nikita
Thanks for bringing this up. I recall it was up for discussion in
PHP 7.0, never made it then. Hope it does it now!

Should one in the RFC reference this bug report from 2012?
- https://bugs.php.net/bug.php?id=61915

r//Björn L

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

Reply via email to