Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75340 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49008 invoked from network); 8 Jul 2014 15:46:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2014 15:46: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.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:46501] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/21-41998-7621CB35 for ; Tue, 08 Jul 2014 11:46:48 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 2CB0FB0008B; Tue, 8 Jul 2014 11:46:45 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GF4berBi0Fjw; Tue, 8 Jul 2014 11:46:45 -0400 (EDT) Received: from andreas-air.home (host86-172-51-137.range86-172.btcentralplus.com [86.172.51.137]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 688E0B00081; Tue, 8 Jul 2014 11:46:41 -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: Tue, 8 Jul 2014 16:46:34 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <924BABDD-03B0-4B9E-BBC2-BEF8A461F8F1@ajf.me> References: To: Todd Ruth X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] Uniform Variable Syntax From: ajf@ajf.me (Andrea Faulds) On 8 Jul 2014, at 16:41, Todd Ruth wrote: > Given that this is a parser change, I wonder if there is hope of = mitigating the BC issues by providing an option to generate "new" code = from "old" code. Today, I can run "php -l" and php will tell me about = syntax problems. If php6 had a "php --convert-from 5.4.30" that would = read in a file that worked in 5.4.30 and output a file that does the = same thing using php6 syntax, I think that would be a Good Thing. = Perhaps it would be better as a tool on the side than as part of the = main php executable. I know such a conversion process is effectively = impossible for some BC breaks; I don't know about this one. This RFC = struck me as a better candidate than usual. For PHP 6, we could probably make a 2to3-style tool (2to3 is a utility = for converting Python 2 to Python 3 source code) for converting from PHP = 5 to PHP 6. Nikic=92s PhpParser would be useful for this, and he=92s = already made a tool to help spot things this RFC would break. -- Andrea Faulds http://ajf.me/