Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74796 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60013 invoked from network); 9 Jun 2014 13:45:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2014 13:45:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.199 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.199 imap2-2.ox.privateemail.com Received: from [192.64.116.199] ([192.64.116.199:47716] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/C1-45325-B8AB5935 for ; Mon, 09 Jun 2014 09:45:48 -0400 Received: from [192.168.0.200] (unknown [90.203.28.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 943125A00BE; Mon, 9 Jun 2014 09:45:43 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: Date: Mon, 9 Jun 2014 14:45:41 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <45A8B0C0-52D1-4E4C-A314-4396B6FD635E@ajf.me> References: To: Nikita Popov X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] [RFC] [PHP 6] Uniform Variable Syntax From: ajf@ajf.me (Andrea Faulds) On 9 Jun 2014, at 14:33, Nikita Popov wrote: > I have created a proposal for a more consistent and complete variable > syntax for PHP 6: >=20 > https://wiki.php.net/rfc/uniform_variable_syntax >=20 > 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=92t = work properly due to this line: self::$views[$path](); It=92s easy to fix ($x =3D self::$views[$path]; $x();) but the fact that = didn=92t 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/