One part crazy, one part awesome.

Is PHP Nothing More Than Web-Legos?

I guess the jury’s still out as far as I’m concerned. Let me be up front – PHP is no longer my language of choice, and I have a slight bias against it. Years ago, when PHP was still relatively nascent and beginning to take over from Perl as the web-programmers choice, I was all over it. I’d learned enough Perl to do most anything I wanted, but PHP was sexier because it had a lot of the stuff you had to work hard for in Perl just built right in. So I jumped the Perl ship and learned PHP. But I wasn’t a seasoned programmer. Though I was convinced I could build whatever I wanted (web wise) in PHP, I began to learn other languages as they either came into vogue or were needed for projects: C, Java, Ruby, etc.

Over time, as I matured as a programmer, I realized that PHP felt toy-like to me, as though it never really matured. It’s object orientation that began to see a little life in PHP4 and have a semblance of maturity in PHP5 always felt bolted on, like it wasn’t really terribly important for the language maintainers, but was added anyway to placate the users.

Recently I took on a project that required me to dust off the old PHP skills as I began to tweak some extant code bases to fit specialized needs. As I worked I joked to a friend “PHP is like web-legos. You can build some cool stuff but it’s blocky and fragile”. But later as I was opening up a a new set of files that would have to be tweaked, I immediately noticed a huge change in the style of code…  these files had real structure, used OO idioms correctly, were formatted coherently, and were easily digestible – all hallmarks of good code that I’d learned to appreciate as I became a better programmer myself. This code was written by a programmer that understood the craft of programming, not just basic hackish problem solving.

So I guess this became a bit of an object lesson that reminded me that it’s not necessarily the tool that is the problem, but the wielder. So my judgement on PHP will have to wait until I’ve spent more serious time with it. But don’t ask me about Perl. Sorry, Larry.

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *