WordPress and PHP5
On Friday’s WordPress Weekly podcast we had a bit of a discussion about WordPress and PHP5. As this is a contentious subject I am not sure how well I explained myself on the podcast I have decided to expand on my thoughts here.
This is a subject that has sparked heated debate in the past and was resurected in the podcast as a result of Matt being asked about it in an interview at Yahoo. I have no desire to get it going in full blown style again, but this isn’t going to go away and eventually WordPress must change.
Straight up, I want WordPress to be PHP 5 minimum, because that is what I use, and what I know, but I want to be reasonable; I want to consider the needs of people who don’t care what version is used as long as it works, or those who are restricted because of their host. That causes me some problems and I am really caught between two opinions with no deciding factor between the two.
It really is hard to get across in text just quite how conflicted I am over these two points.
In the interview Matt stated that there are no killer features in PHP 5 that make upgrading really exciting and I largely agreed with that on the podcast, but I want to make a distinction here.
There are some great features in PHP 5, features that I think could bring a lot to WordPress. Features that increase security, make it easier to work with objects, make it easier to create ajax features and work with XML; however, if the figures on PHP 5 adoption are correct it seems hard to justfy these benefits when compared with the possibility that over 50% of users will find that they cannot upgrade, and those that do may well find their blogs inoperable with no idea why.
In that context I don’t see anything PHP 5 brings as do-or-die features.
If it were really up to me, I would just bite the bullet and do it. I would label the next version of WordPress after 2.5 with a minimum requirement of PHP 5 and make a big fuss about it to be sure no one missed it. I would tell users to ditch any hosts that have not upgraded.
WordPress 2.5 would have been ideal for this because there a lot of other big changes, why not get the big stuff out of the way? But it isn’t up to me.
Given that it isn’t up to me the next best solution is PHP 6 compatibility. I mentioned this in the podcast because I think it is important.
PHP 5 is for the most part PHP 4 compatible, but some of these compatibilities will not be there in PHP 6. The big one for me is that PHP 6 won’t support PHP 4 style object constructors, but I’m sure there will be other things.
Update: I can’t tell you where this information came from because I haven’t been able to work it out. Wherever I got it from it seems it just isn’t true. I was wrong. Nothing suggests that this will be the case and so we shall just have to wait and see what is or is not compatible when PHP 6 is released.
There is so much potential within PHP 5 that I think it would be a shame for WordPress to fall behind as a result of trying to maintain support. Competition is growing all the time, as is the temptation to jump ship.
I think there is a decision to make about whether WordPress should try and serve as many people as possible, or keep up with the technology to be the best it possibly can be. These may not be compatible and I am glad it isn’t my choice to make.
Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment