(This article has been translated into Spanish (PDF, with some additions) by Jorge Amado Soria Ramirez â thanks!)
Iâm cranky. I complain about a lot of things. Thereâs a lot in the world of technology I donât like, and thatâs really to be expectedâprogramming is a hilariously young discipline, and none of us have the slightest clue what weâre doing. Combine with Sturgeonâs Law, and I have a lifetimeâs worth of stuff to gripe about.
This is not the same. PHP is not merely awkward to use, or ill-suited for what I want, or suboptimal, or against my religion. I can tell you all manner of good things about languages I avoid, and all manner of bad things about languages I enjoy. Go on, ask! It makes for interesting conversation.
PHP is the lone exception. Virtually every feature in PHP is broken somehow. The language, the framework, the ecosystem, are all just bad. And I canât even point out any single damning thing, because the damage is so systemic. Every time I try to compile a list of PHP gripes, I get stuck in this depth-first search discovering more and more appalling trivia. (Hence, fractal.)
PHP is an embarrassment, a blight upon my craft. Itâs so broken, but so lauded by every empowered amateur whoâs yet to learn anything else, as to be maddening. It has paltry few redeeming qualities and I would prefer to forget it exists at all.
But Iâve got to get this out of my system. So here goes, one last try.
I just blurted this out to Mel to explain my frustration and she insisted that I reproduce it here.
I canât even say whatâs wrong with PHP, becauseâ okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.
You pull out a screwdriver, and you see itâs one of those weird tri-headed things. Okay, well, thatâs not very useful to you, but you guess it comes in handy sometimes.
You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.
You pull out the pliers, but they donât have those serrated surfaces; itâs flat and smooth. Thatâs less useful, but it still turns bolts well enough, so whatever.
And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And thereâs no clear problem with the set as a whole; it still has all the tools.
Now imagine you meet millions of carpenters using this toolbox who tell you âwell hey whatâs the problem with these tools? Theyâre all Iâve ever used and they work fine!â And the carpenters show you the houses theyâve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.
Thatâs whatâs wrong with PHP.