WordPress drops PHP 4 in Q1 2011

Introduced under a smaller flag of taking care for testing, a new direction slipped into wordpress developement: To drop PHP 4 and switch over to PHP 5.2 as a minimum requirement for wordpress. Opinion leader Andrew Nacin made the igniting announcement. (Finally; some might think.)

PHP 4 in wordpress has a long history on it’s own. Three years ago Matt Mullenweg misunderstood the address of the goPHP 5 initiative and labeled version 5 of the free software project named PHP a failing product. Finally this chapter is to come to an end in the wordpress development timeline. This is about to happen in Q1 2011, and highly likely that PHP 5.2 (released November 2006) will be the version requirement for upcomming wordpress 3.1 – currently developed as the so called trunk (the main line of development).

The announcement came quite surprisingly because wordpress software development is currently known to be on hold for decisions of such type until the beginning of September. Developers are called to focus on improvements on the projects website instead.

The requirements of wordpress, specifically the compatibility with outdated PHP 4 versions, has been more and more questioned over a longer time-span by an ever growing part of the active developers in the community. Writing compatible code for the longtime outdated PHP version 4 (EOL: 2007-12-31) is nothing easy to do today. As a developer you need decent knowledge of PHP internals and how they changed between version 4 and 5. That version change dating back to July 2004 marked the upgrade of the default PHP interpreter, the Zend Engine, from generation I to II and with that, it introduced a new object model and changes in variable handling to name two prominent changes.

The PHP 5 demanding part of the wordpress user-base has started to jubilee over the long awaited decision and reacted quite actively and positive to the announcements.

Because the version change has been introduced for testing issues (to not need to do tests on older PHP platforms in the future), there is no need to even touch the codebase for the version change because the current code already runs on PHP 5.2 and up. Announcing developer Andrew Nacin on this:

For us, it’s about testing coverage. If we have finally reached the point where too few users are running and testing WordPress on PHP 4 and early versions of PHP 5 for us to be able to make an informed guarantee of their compatibility, then it’s time to move on.

But the change in requirements can lead as well to questions which benefit users of the open source software will have from the version change. Even there are many new features introduced in PHP 5.2 compared to PHP 4.3 (current requirement), the announcement might be too young, that there could be made much of a mind, which consequences this announcement will have for wordpress developers. If you read what Andrew Nacin write carefully, you might come to the conclusion: certainly not much as of now:

But it [the drop of PHP 4] is not about features, or language constructs, or needing to occasionally cater to PHP 4 syntaxes […]. […] Dropping PHP 4 won’t change us overnight, nor would it change our development philosophy.

As this is true for every grave development decision in the wordpress project, its true for this one as well. But maybe this change and the surrounding discussions will create a more open atmosphere for PHP related development topics and which features of PHP 5.2 to actively use to modernize the 5 years plus old wordpress codebase – without falling into overdrive for the PHP 5 demanding part of the developer base. Before introducing new designed code or even implementing development patterns, stones are lying around that need to be moved away first. The time these tidy-up actions would need is there until Q1 2011 – enough time for the job. Let’s do not rush things, 24 month I assumed in May 2009, so it’s all quite on schedule ;).

The WordPress codebase is known to follow the Big Ball of Mud-(anti-)design-pattern and most of the code has been written for the Zend Engine I / PHP 4.

Read On: WordPress 3.0 and PHP 4 – What’s the deal? (hakre; 10 May 2010)

References

PHP 5 Related WordPress Tickets
Some of the following tickets are related to a change of a PHP version, some are to reference issues, that can considered to be solved after the version change to PHP 5.2 with no guarantee of completeness, see my PHP 5 List as well.

This entry was posted in Hacking The Core, Pressed, Reports and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.

6 Responses to WordPress drops PHP 4 in Q1 2011

  1. Andrew Nacin says:

    I didn’t start anything. I didn’t announce anything. No decision has been reached.

  2. hakre says:

    Whether or not you started a Post, whether or not you announced the suggestion to remove PHP 4 as the first one in the current discussion (AFAIK), it might just be that things will turn out as written.

    Thanks for taking care BTW.

    I did not put the 10% line on topic which might be the real background info to understand why things are green to change, but that could have been earlier as well so I do not know the terrain well enough to write a report about that. It would be a guess.

    So please do not feel offended for name-dropping here, I think your post really started something.

    • Andrew Nacin says:

      Backstory: This started when I looked into the Earthlink/PHP 5.0.5 issue, which ignited a discussion among the core developers. We studied the PHP usage trends and decided to add it to the agenda.

      While I appreciate the offer of credit, my post was published at the same time that Mark posted the agenda suggestion. It was first drafted about two weeks before but I wasn’t quite happy with it. That said, it is certainly a good window into my thoughts, and perhaps the thoughts of others, and it had indeed been timed to coincide with a discussion I expected to happen soon.

      So yeah, I was only really replying to “WordPress drops PHP 4 in Q1 2011” and that I made an “announcement.” I didn’t make an announcement, and when we drop it isn’t certain. At least until tomorrow.

      • hakre says:

        And that’s only for the current discussion, the overall story is of greater scale and there are many developers involved. So even if this will be Q2 in 2011, that’s not that much of a difference.

        The drop of PHP 4 from WordPress requirements is a very positive message.

  3. Pingback: WordPress 3.0 and PHP 4 – What’s the deal? | hakre on wordpress

  4. Pingback: WP Plugins: How to remove a Filter | hakre on wordpress

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.