On 8 Jul 2014, at 16:41, Todd Ruth <tr...@proposaltech.com> 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’s PhpParser would be useful for this, and he’s already made a tool to help spot things this RFC would break. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php