Uniform Variable Syntax
| From: | Todd Ruth | Date: | Tue, 08 Jul 2014 15:41:48 +0000 |
| Subject: | Uniform Variable Syntax | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-75339@lists.php.net to get a copy of this message | ||
On 8 Jul 2014, at 15:48, Derick Rethans <derick@php.net> wrote:
> I've just voted "no" for this, because it introduces a tiny BC break.
> Now, I realize this is a tiny BC break, but it is just *those* that
> drive people nuts when upgrading. There is so much non-public code - a
> cursor check of Symfony and ZF is not representative.
From Andrea Faulds:
> It is a tiny BC break and it’s for PHP NEXT (i.e 6 or 7), not 5.6. Why not? It’s a
> tiny change which will bother some people but make everyone
> else’s life easier.
Thank you, Derick, for voting against a BC break.
I do appreciate the intention of making things more consistent.
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.
Thanks for your consideration.
- Todd