On Sun, Feb 3, 2013 at 11:22 PM, Nikita Popov <nikita....@gmail.com> wrote: > On Sun, Feb 3, 2013 at 12:36 PM, Karoly Negyesi <kar...@negyesi.net> wrote: > >> Hi, >> >> So, if we are talking about PHP 6, then the opening <?php tag should be >> accompanied by the version it was written for, it was tested with and then >> the engine could switch to a compatibility mode for that version. >> >> Seems to me that this would solve the problem where a host can't upgrade to >> a more modern version for fear of breaking old code. Consequently, open >> source packages -- like Drupal I am deeply involved with -- can't use more >> modern PHP versions decreasing the "push" for hosts to upgrade. This is a >> devilish circle and it'd be great to break it. >> >> Regards, >> >> Karoly Negyesi >> > > At least two points why this makes no sense whatsoever: > > 1) One would have to maintain or at least keep around all previous versions > of the engine and the libraries. That would be a shitload of cruft and a > lot of maintenance work. > > 2) Different behavior per-file is not feasible as components in both files > interact. If you have one <?php6 file and one <?php5 file and both interact > (like, you know, calling a function from one file in the other one) you > will have a pretty hard time decided what behavior this should result in. > The <?php6 behavior or the <?php5 one? So something like this can only be > done on a per-request basis (rather than per-file). And to do this on a > per-request basis you already have all the means. Just run two different > PHP versions. No issue with that; doesn't require no further support from > PHP. > > Nikita
> Just run two different PHP versions. Using Debian/Ubuntu, I have "python2.6", "python2.7" and "python3" packages, but only one version of "php5-fpm". Maybe it would be better to have "php5.3-fpm" and "php5.4-fpm", using /etc/php5.3 and /etc/php5.4 ? Esp. for Travis-CI it would be much better to have separate packages than running custom workarounds. Regards, Thomas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php