When you get to be my age you start thinking about the future. You start wondering if some of the choices you made when you were younger. You wonder if those choices are going to come back and haunt you. If you don’t have such thoughts you are either an idiot, or a young person without enough experience to make you think such things.
One of the things that I have been wondering about is whether my decision to focus on PHP several years ago was the right one. Technology is always changing and eventually the guys writing Ruby, too, will start having children and then will start looking down upon people who use disposable diapers instead of more environmentally friendly cloth instead. In other words, times change and one of the keys to navigating change is to know what to change, why to change and when, if ever, change is necessary. Change for the sake of change is stupid.
There are several changes that are occurring in technology. But one thing that has not changed has been the venom that PHP has been on the receiving end. Much of the venom is, in fact, deserved, though the quantity by which the venom is spewed is not. If you are the source of 75% of the traffic on the Internet then you might be doing something right. But that 75% is today. What about tomorrow?
And so my question has been “will there be enough innovation in PHP to keep it a force to be reckoned with several years down the road?” I ask this because there are market and technology changes occurring that PHP is not well suited to navigate.
But before you think that I am totally down on PHP that is not quite true. PHP was a revolutionary force when the web first came out. It, and not any other programming language, democratized the web in a way that was not otherwise possible at the time. But with the web won PHP kind of sat on its laurels for a bit. Because of this several different languages have gained a foothold. While PHP won the initial battle for the web (and did it convincingly) it did not protect its flank through continued innovation. Innovation occurred to some extent, but PHP did not really mature. In fact, I would argue that Ruby did what market forces are supposed to do to competitors ; forced them to step up them game.
And PHP did. Within the span of just a few years framework after framework shot up. The running joke was Q: “How many frameworks are there today?” A “That depends. Is it Wednesday or Thursday?” Ruby threatened and PHP responded. Symfony, Zend, Laravel, Cake and a host others that I am not listing matured the PHP community very quickly. What was once a hack language grew into a much more mature ecosystem.
But again, PHP seems to have stagnated a little. There have been several people who have noted dis-function in PHP internals. I’m not involved that close with that and so I have no definite statement I am willing to make. However I have been concerned and what I am perceiving to be a slowdown of innovation since PHP 5.3 came out.
But the hack language may be on the verse of another jump forward via the Hack language and the HipHop VM. While I, as a metalhead, object to the naming of the aforementioned VM with the release of version 3 we may be seeing something that could possible extend PHP’s life by 10-15 years and introduce another round of innovation for PHP.
With version 3 the excitement is almost palpable. Davey Shafik and Padraic Brady have written blog posts recently that are the source of my optimism. Resource utilization is a significant concern of mine at Magento (where I work now). Magento does some really great things but does them at a fairly significant cost of CPU time. If you’ve played with Customer Segments in EE you know what I’m talking about. or, for that matter, rendering the layout. When I was working at Zend I was constantly asked “what switch do I need to make PHP faster?” and an opcode cache can only do so much. With Hack and HHVM that, quite literal, is a possibility. In the spirit of full disclosure, I have not had a chance to play with it in depth and I hope to be able to soon, but the potential is there.
And that potential is something to be excited about. Facebook has demonstrated significant resolve in building the HHVM. It, like PHP to begin with, was built to solve a real problem; the problem of moving an old language into new times.
And maybe, just maybe, solving that problem will help keep PHP in the position it is in. Maybe an old dog can be taught new tricks.
Now if only someone could provide my wishes of core low level event APIs and easy messaging integration.