4 Jan 2010, 11:53 p.m.

The Year Ahead in PHP

It's that time of year when thoughts, and indeed blog posts, inevitably turn to pondering the twelve months that have gone before. For my part, I thought it might be nicer to have a look forward into 2010 and think about some of the challenges and developments I might expect to come up against in my PHP work over the course of the year.

PHP 5.3?

Note the question mark. PHP 5.3.0 was released in June 2009, and despite being presented as a major improvement to the language, hasn't seen quite the rate of adoption that many were expecting. I don't know why - perhaps it was just too major an improvement for a minor version. Usually the blame for slow adoption is attributed to hosting companies dragging their feet, but given that the 5.2.* branch of PHP is being actively maintained and released, there must be other factors.

Despite rolling out a brand new production environment in the middle of the year, we made the decision not to adopt a *.0 of PHP at that time, instead preferring to wait for the inevitable *.1 with its equally inevitable list of bugfixes. 5.3.1 was a long time coming, eventually surfacing in late-ish November. Given our workload by that point, there was no way we'd be migrating in 2009.

So what does PHP5.3 bring that might make it a compelling upgrade next year? Well, namespaces, closures and GOTO seem to be the main selling points. However, none of those three really grabs my imagination, for reasons that are probably way off topic, but may surface in another post somewhere down the line. In short though, to me those features contribute little to productivity, yet give developers so much more rope with which to hang themselves in terms of unmaintainable code.

Still, 2010 will certainly be an appropriate time to keep an eye on developments, and study the migration guide, and in particular the backward incompatible changes. While forging ahead blindly with the latest and greatest is risky, it can be even worse to get stuck on an obsolete branch of a core technology (like those poor souls that got stuck on PHP4) so we'll see.

PHP6?

Note the even larger question mark! With the noise around PHP 5.3 it has been easy to forget that work continues on PHP 6.0. The main selling points of PHP 6 were to center around its native support for Unicode. As PlayPhone gear up for launches in the Far East, we find ourselves doing more and more work with unfamiliar character sets, so this is very much of interest.

Oddly though, a lot of the work that was to form PHP6 has made it into PHP5.3, and the Internationalization extension closes the gap yet further. Now it seems there's a real possibility that PHP6 will become PHP's Perl 6 - if you see what I mean.

So by adding a section on PHP6 to this post, I'm not implying that we'll see PHP6 in 2010, but that throughout this year will be very interesting to see what does happen with regard to the next major version of PHP.

Migration Away from Zend Platform

I've been using Zend Platform for some time now, and even wrote about it for php|architect magazine in 2008. However, I think 2010 will be the year to move away from it.

This is partly because Platform's per-core licensing makes the product prohibitively expensive to run in non-trivial server environments. Moreover though, there's reason to believe that Platform will reach end-of-life before very long. Zend are saying nothing of the kind, of course, but it's clear that Zend Server is the planned replacement, and I can't see Zend maintaining both products for much longer.

What's interesting is that Zend Server probably isn't a viable option, at least not the full Enterprise edition. While Platform was expensive, crucially developer licenses were free - meaning that one could install a full-featured instance of Platform on your laptop or development server at no cost, and crack on with investigating and developing against the features.

Zend Server has no such developer licensing, only a feature-limited "Community Edition". Personally I feel that if I'm not in a position to be able to evaluate the product, then I won't ever be in a position to choose to use it in production.

So the time has come to investigate alternatives, preferably open source ones. Replacing Platform's session clustering, and also debugging facilities will be particularly challenging. I'll be sure to cover any interesting findings in this blog, so stay tuned.

Continuous Integration

Recent years have seen PHP developers showing an increasing amount of interest in the set of best practices revolving around version control (VC), unit testing and automation. The logical culmination of these practices is Continuous Integration.

As professional practices among PHP teams approach, and in many cases exceed, those among other languages such as Java, what's genuinely gratifying is that I see real interest in CI within the PHP community: php|architect magazine has featured phpUnderControl at least a couple of times this year, and my Lightweight Continous Integration for PHP has quickly become one of the most popular articles on this site.

For my own part, having done a lot of the groundwork in 2009, I hope 2010 will be the year I can implement CI fully both at work and on personal projects.

JavaScript

"JavaScript?" you say, "I was promised a post about PHP!". Well, not for nothing was Ed Finkler's PHPAdvent piece titled "You Really Need to Learn JavaScript". I'll let him explain why, but the fact is - and it really, really pains me to say it - that JavaScript is going to become harder and harder for the PHP developer to ignore, and quickly.

HTML5 - which is in effect little more than a euphemism for JavaScript - promises to change the way web apps work. Nowhere is this more true than in the mobile field. Where we've previously been fundamentally limited by what mobile browsers can do, complete support for HTML5 in browsers such as Opera and Safari will level the playing field across desktop and mobile Web, whilst eroding the hegemony of the "app stores". The Mobile Web suddenly got interesting again.

Either way, becoming competent in a completely different approach to programming, and in particular object-orientation, can do no harm, so I'll be dusting of the JavaScript books.

Conclusions

So 2010 should be an interesting year. It's probably also worth mentioning that we can expect a significant new Zend Framework version. There will also be some interesting conference action here in the UK - PHPUK (formerly PHPLondon) and the third annual PHPNW spring to mind. I'll try to remember to return here in a year's time and look at how things panned out!

Posted by Simon in PHP
5 Jan 2010, 11:27 a.m.

Ciaran McNulty

Nicely provocative point about HTML5 :-)