Re: [RFC] [PHP 6] Uniform Variable Syntax

From: Date: Mon, 09 Jun 2014 15:02:37 +0000
Subject: Re: [RFC] [PHP 6] Uniform Variable Syntax
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-74803@lists.php.net to get a copy of this message
On 09.06.2014 15:33, Nikita Popov wrote: > https://wiki.php.net/rfc/uniform_variable_syntax > > The RFC is targeted at PHP 6 because it breaks compatibility for some > rarely used variable-variable constructs. I am all for consistency, but if I look at this: >Example of expressions those meaning changes: > // old meaning // new meaning > $$foo['bar']['baz'] ${$foo['bar']['baz']} > ($$foo)['bar']['baz'] > Foo::$bar['baz']() Foo::{$bar['baz']}() (Foo::$bar)['baz']() > $foo->$bar['baz']() $foo->{$bar['baz']}() > ($foo->$bar)['baz']() Those last 2 lines (old meaning) are exactly as I would have read them without thinking. So.. either I just got used to some kind of subliminal rule over all these years or I'm missing something. They're not variable variables, either. Somewhere in the proposal you write "It follows normal left-to-right semantic". This sounds very good in theory, but right now it feels a little unintuitive. Greetings, Florian

« previous php.internals (#74803) next »