php4, php5 and php6 — thoughts and stats

Interesting — If you think php5 is a no brainer choice since it's been around for almost three years now, you might want to think again.

I can find lots of reasons to develop in php5 rather than php4. php5 is closer to what I'd expect from an object oriented language, and it's reportedly 25% faster. Not to mention the pdo class, which is wonderful to work with.

Then again, developing software that 50% of your user base simply cannot use doesn't make any sense.

Picture the results of a poll conducted on Semiologic for two weeks:

Your server's php version?

  • php 5.1.x: 24% (82)
  • php 5.0.x: 12% (41)
  • php 4.4.x: 29% (100)
  • php 4.3.x: 17% (57)
  • Other php version: 3% (9)
  • I don't know: 16% (56)

Total Votes : 345

It is all too clear to me that incompatibilities between php4 and php5 are to blame. And I predict that things will get even worse with php6.

I bumped into this unofficial php6 wish list recently:

cleanups

  1. Get rid of the BC crap in ext/date (derick)
  2. remove register globals DONE (pierre)
  3. remove all magic_* and throw E_CORE_ERROR when set DONE (pierre)
  4. safe_mode/open_basedir
    1. remove safe mode and throw E_CORE_ERROR when set
    2. unbundle safe_mode_exec_dir from safe_mode and keep it (rasmus) (take a look at this patch too)
    3. new ini option: open_basedir_for_include which would allow using include/require(_once) on an expanded set of directories (sara)
  5. Make the call-time-pass-by-reference an E_STRICT error. DONE (dmitry)
    (…)

Also of interest, in PECL:

regexp

  1. make ereg an extension
  2. PCRE extension will not be allowed to be disabled.
  3. core of PHP should be made to work with PCRE so that we can safely disable ereg
  4. unbundle the regex library

It's like… tons of apps will be broken and will need to be rewritten. Not to mention that php4 and php6 apps will not easily be made compatible, which will most likely slow down host adoption of php6 even more.