PHP and its deficiencies

By | September 10, 2006

First of this post is not going to tell you not to use PHP, on the contrary I like using it! But what I will try to get across is the fact that PHP still has a long way to go before I will consider it a powerful web development tool.

Time to get started. Let me first start with explaining why I think you should use PHP, even though it is far from perfect.

  1. It’s a good, relatively stable tool for creating dynamic content
    With this I mean that without to much knowledge you are able to create a dynamic website. And as soon as your web application is running it is very unlikely to crash. (Though I have experienced this in the past)
  2. Lots of hosting providers offer support for PHP
    So one of the most important plus points is the wide spread support. Which is also one of its biggest problems, but more on that later on in the post.
  3. PHP is very well documented, with a good support base
    This one should be obvious, I think it’s very important that a programming tool is just that. A very good stable and well documented tool, and not a nightmare to work with. This also helps make newbies learn the language reasonable fast.

With all of these plus points why do I still find PHP to be in its infancy. Ok I guess it’s time to tell you why I don’t really like programming in PHP. To get my point across even better I think it’s best to make a similar list as the one above.

  1. No good support for object based design
    Ok here some will disagree with me, but I find PHP lacking even the most basic support for object based design. I know that version 5 is setting a step in the right direction, but be realistic how many web hosting providers support PHP 5.
  2. No support for cross request variables
    The most used feature, at least for me, is a caching system that uses static variables to share data across sessions and HTML requests.  PHP does support IPC (Inter process communication), but it is very impractical and poorly implemented.
  3. Damn difficult to debug
    PHP is per definition not debuggable. Now I know that very expensive packages like Zend Studio do support some sort of debugging for PHP, but I don’t feel like paying a fortune for something that should be included in the PHP core. A good example of how it should be is Netbeans with Tomcat. (I love debugging with these two as they do it so damn well)

Like I stated before I don’t hate PHP, in fact I use it quite often for web development. But I find it difficult to call it anything but a scripting language at this time. Maybe with version 6 it will become a ‘real’ programming language. Until that time I favour Java with JSP above PHP.

Leave a Reply