Leon Sorokin wrote on 13/12/2014 22:45:
Hi guys,
I was wondering if 7.0 could be the version to fix the long-standing
incorrect ternary associativity bug in PHP [1]. This seems especially
worthy of reconsideration since the Null Coalesce RFC has been
accepted and merged [2] with the correct associativity [3].
The major version change seems like the only time to get this done in
PHP.
[1] https://bugs.php.net/bug.php?id=61915
[2] https://wiki.php.net/rfc/isset_ternary
[3] http://news.php.net/php.internals/79584
thanks,
--
Leon Sorokin
Actually, thinking further on this, I'm not sure I've ever actually been
affected by the associativity of ?: one way or the other.
I have fallen foul of its precedence relative to concatenation, as in:
echo 'hello' . false ? ' world' : ' there' . '!';
http://3v4l.org/i7cSc
But I think this is the same in other languages, and not related to this
bug?
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php