Belated birthday wishes to PHP

PHP, the web scripting language that powers almost 80% of the web turned 25 yesterday. This is quite an achievement for something developer, Rasmus Lerdorf had intended as nothing more than a C templating language.

I remember playing around with the language in the early years of this century, back when it was still a new thing, and got as far as writing half a content management system before I discovered that B2 and (later) WordPress were achieving the same results in a far, far better manner.

PHP is the workhorse of the web but not fashionable. The language is easy to use but its dynamic and forgiving nature makes it accessible to developers of every level of skill, so that there is plenty of spaghetti code out there, quick hacks that evolved into bigger projects. In particular, early PHP code was prone to SQL injection bugs as developers stuffed input from web forms directly into SQL statements, or other bugs and vulnerabilities thanks to a feature called register_globals that was on by default and which will “inject your scripts with all sorts of variables,” according to its own documentation.

Which is probably a fair summary of the language. It’s very easy to pick up and start using but this ease of use also means that it’s similarly easy to get way over your head and create something of a disaster for yourself.

That said, it’s a well established language now and one that isn’t going anywhere. PHP will certainly still be around in 25 years time, but it will be interesting to see just how much further it develops over that time.