Re: Fix incorrect ternary '?' associativity for 7.0?
| From: | Rowan Collins | Date: | Mon, 15 Dec 2014 18:54:45 +0000 |
| Subject: | Re: Fix incorrect ternary '?' associativity for 7.0? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79666@lists.php.net to get a copy of this message | ||
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 SorokinActually, 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]