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

From: Date: Mon, 09 Jun 2014 13:45:41 +0000
Subject: Re: [RFC] [PHP 6] Uniform Variable Syntax
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-74796@lists.php.net to get a copy of this message
On 9 Jun 2014, at 14:33, Nikita Popov <nikita.ppv@gmail.com> wrote: > I have created a proposal for a more consistent and complete variable > syntax for PHP 6: > > 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 love this proposal! The behaviour of $$ is non-intuitive at present and has bitten me more than once, and the weird behaviour of :: has also caused me problems. In particular, my miniature web framework didn’t work properly due to this line: self::$views[$path](); It’s easy to fix ($x = self::$views[$path]; $x();) but the fact that didn’t work has bothered me immensely for two years. It seems to me like the RFC would fix this. Would it? If so, you are my hero. On a somewhat more serious note, do we have any idea of how much code this would break? Is the current behaviour widely relied-upon? -- Andrea Faulds http://ajf.me/

« previous php.internals (#74796) next »