[development] Looking forward next year and PHP versions

Larry Garfield larry at garfieldtech.com
Wed Nov 15 05:28:51 UTC 2006


On Tuesday 14 November 2006 09:54, Karoly Negyesi wrote:

> And what Drupal could do?
>
> *) Drupal 6 could have PHP 4.4 as a minimum so that we can use Unicode
> properties in pregs and thus simplify search module for example.

I don't think this is unreasonable.  While I appreciate shared hosts' concerns 
re backward compatibility, security patches are only happening on 4.4.x now 
for the PHP 4 branch.  4.3 is effectively unsupported by default.  (I'm 
personally rather surprised that Drupal doesn't already require 4.3.9 or 
4.3.10 anyway, since those were stable and widely deployed for a long time.)

> *) Drupal 6 could begin to deprecate PHP4 with using PHP5 only functions ,
> like array_diff_key , array_walk_recursive and such. These could be
> emulated by an include file. We would not use features that can't be
> emulated. With this technique we can have quicker and smaller code on PHP5
> and still keep compatible with PHP4. We might need to talk to the guys who
> have written PEAR PHP Compat -- what they think of GPL'ing a part of that
> work? The problem is that some functions can be --easily-- emulated only in
> one way and I do not want to appear as if we stolen their code.

I would support this as well.  I already use array_combine(), scandir(), and 
similar PHP 5- only functions in my own work (either with PHP_Compat or with 
my own less-good versions), and find them invaluable.  Even just adding in 
compatibility functions for such things without dropping support for anything 
officially would be good.  

> *) Drupal 7 could drop PHP4 compat alltogether. If we keep the six month
> schedule, this will be released around the end of 2007 and run in 2008, so
> I think it's time. Unless we begin to use some advanced OOP mojo of PHP5
> it's very likely that with the compatibility include and some PECL
> extensions D7 would still run on PHP4 -- just it would not be supported. I
> had some list here of what I want to use in PHP5 but I simply do not want
> this thread to divulge into that. Let's pretend we have an agreement that
> we know there are stuff exclusivel to PHP5 which we want.

My concern here is the number of shared hosts that are still PHP 4 only.  I 
don't know what that market will look like in a year, but I recall hearing 
that the PHP.net folks are planning to maintain three versions of PHP in 
parallel.  (I think they're insane, but that's just me. <g>)  I'd love to be 
able to reliably leave PHP 4 in the past; I just don't know if the current 
market would let us get away with it.

Didn't someone (Dries?) do a benchmark at some point that showed Drupal was 
faster under PHP 4 than PHP 5, by a slim margin?  (I won't pretend to 
understand the internals of the Zend Engine well enough to explain why that 
would be.)

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the development mailing list