On Fri, Aug 15, 2014 at 5:58 PM, Christoph Becker <cmbecke...@gmx.de> wrote:
> Andrey Andreev: > > > I'd personally find it horrible if $foo[$i] = $bar[$i++]; is executed > > right-to-left, but given that your examples are a bit weird, I'm not sure > > if mine is affected. Is it? > > Isn't that evaluated from right to left already since PHP 5.1.0? See > <http://3v4l.org/Ivfdr#v510>. > Yes, anything containing simple variables (like $i) will often deviate from the usual evaluation order due to the CV optimization. I don't touch that. What I've changed now is that ${a()}[b()] = c() will continue to call a, b, c, rather than calling c, b, a (which was what the AST implementation initially did). I honestly don't think that it matters, but I figured that it's best to stick with the more "logical" behavior as long as it's not too much trouble :) Nikita