robinadr

The WordPress and PHP 5 debate has sparked up (again?), mostly brought on by the discussion on the mailing list and Matt’s post on PHP 5. I think this post on funkatron.com explains it pretty well — what we do now with a mess of code could, in a lot of cases, be made into OOP code that is a lot simpler, plus PHP 5 has many advantages such as PDO, which the Habari project has taken advantage of.

My biggest problem with the post? These few excerpts:

(In 2007, their site still doesn’t have obvious permalinks. They do have a RSS 1.0 feed though, remember those?)

Some app makers felt sorry for PHP 5 and decided to create the world’s ugliest advocacy site and turn their apps in to protest pieces at the expense of their users.

Come on, Matt. This is pretty underhanded. So what if their site doesn’t have a proper blog, with permalinks and et cetera? And remember when the WordPress site looked very similar? You know, all gray and boring? Didn’t stop it from becoming one of the most popular, if not the popular, blogging softwares at a surprisingly exponential rate. Don’t judge a book by its cover.

If you don’t support the move to PHP 5, fine. But at least someone had the guts to move forward with an initiative that has the potential to help WordPress in so many ways. And if WordPress wants to place its bets on outdated software that will no longer be supported by its vendor, then so be it.

9 Comments

  • My biggest problem with your post?

    “what we do now with a mess of code could, in a lot of cases, be made into OOP code that is a lot simpler”

    I strongly disagree there.

  • One thing we could do better with PHP 5’s OOP is the options handling. Using method overloading we could create a much easier way to add, set and remove variables. So instead of add_option, update_option and et cetera, you could merely refer to Options::html_type and manipulate that with unset() and so on.

    Also, that would make caching more transparent and IMO it’s a lot easier to handle options that way.

  • Also, did you read the funkatron.com post? Global variables are, IMO, a clumsy and error-prone way of handling what could be done with namespaces.

  • It’s different, but I don’t see that any better or worse. We’d need to keep the old function wrappers around anyway for compatibility, so overall we’d just increase the weight of WP.

  • It’s a neat feature, but the places we output XML are either in the XML-RPC server, which has proven quite robust already, or in the RSS/etc templates, which are pretty simple and in line with every other template in WP. If we moved to full serialization for RSS our actions and hooks would have to change as well.