0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

Not-so-deep PHP thoughts

You know, not that I've been at it for long, but I've had an long-running observation about PHP:

As a language and an API, PHP kinda stinks. It's got more crud than I left behind in Perl, but without all the meta-magic that made it worth it. And, I get a little nervous tic when I think about it in relation to Python and Ruby.

On the other hand, it's ubiquitous and cheap—and because it's in the hands of people with all levels of skill, most popular PHP apps have by necessity managed a high standard of easy install and simplicity. The languages with more meta-magic tend to attract eggheads (myself included) who can forget about keeping things simple.

And, did I mention PHP is ubiquitous?

Archived Comments

    1. PHP has some future-proofing in that almost everyone doing web development knows it or can pick it up. That reduces risks for IT adoption.
    2. $5/month web hosts have it installed.
  • While I don't care for the crappy structure that the language seems to revel in (SQL in your HTML? WTF?), what I despise about PHP is how hard it is to build and deploy it with a ny extensions to the basic feature set.

    If you need to do images, you compile in LibGD, if you want to render text, you get the freetype libraries, if you need something that isn't mysql, you compile that in- and then off you go trying to find the version of libJpeg from 1993, because the ancient version of libGD that's bundled with PHP doesn't work with anything more recent.

    Plain-vanilla PHP is ubiquitous, but trying to roll your own on an arbitrary box somewhere and do something that doesn't come with the default PHP that ships with your distribution is a huge and unnecessary pain in the ass. Perl can be annoying, but at least it isn't a monolithic binary- the library system drastically reduces the cross-component dependencies that PHP suffers from.

    PHP sucks, and it amazes me that it is so ubiquitous. On the otherhand, so is Microsoft Windows.