So, I wrote an article a year ago detailing a few of the ways in which I thought PHP was killing itself. And, predictably, since no one reads my blog, it got no attention. And then somebody tweeted it and somebody else submitted it to Hacker news. And then people started commenting on how I was an idiot, and now I have to respond.
First of all, a few people (idiots) misinterpreted what I meant by "dead." They seemed to think that I meant PHP would disappear off the face of the earth, and would be a relic of a bygone age. It would be taught by die-hard professors in computer science classrooms who yearned for the good ol' days of "Apache" and "MySql".
In short, that's not what I meant.
When I said "dead," what I meant was, "no longer living." This is a clever use of a literary technique called "personification" that I learned from Mrs. Aylard, my high school English teacher.
You see, PHP is not literally dead. PHP is no longer living: it's no longer evolving. I meant that PHP has hit its peak, and it will no longer be getting any better. Then I went on to detail all the ways in which it was dying such that my initial hypothesis was substantially supported. The only thing I didn't do was cite sources (sorry, Mrs. Aylard).
But allow me to elaborate a little more, as it's been a year, and I'm much wiser.
PHP is a web language. You can pretend it does more, but let's be honest: it sucks for
everything except doing stuff on the web. You can write little shell scripts here and
there with it, but the fact that it took 10 years before you could parse command line
arguments natively should tell you something. I would wager that less than 1% of PHP
developers know how to read from stdin (I can't remember either, I know it has something
to do with
So, PHP's greatest strengths are:
- It's good for doing stuff on the internet
- A lot of hosts support it
#2 is pretty irrelevant now. There's an Apache module for everything these days (mod_lisp, anyone?), and shared hosting is sooooo 1999. I mean, get on the cloud already, AMIRITE?
#1 is still extremely relevant, but not as relevant as it was 5 years ago, or even one year when I wrote the article. node.js has blossomed nicely (for reasons I don't completely understand), and Ruby on Rails and Django are like the new hipster frameworks. Find me a start-up that's not using RoR or Python and I'll show you a start-up that's using Scala and will probably fail.
You won't find ANY start-ups using PHP. Facebook and Digg are the last holdouts, and Digg's basically the Titanic only its iceberg was called Reddit (allegory ftw, thanks Mrs. A), and Facebook wrote a freaking PHP-to-C++ compiler to improve performance, for God's sake. Not only is PHP not "enterprise", it's not even the opposite of enterprise. It's not exitprise. I can't make it any clearer than that.
But it's great for douchebags like me who want to rant about stuff that doesn't matter. It's great for personal websites, corporate websites, really any kind of website. It's good for blogs that are install-and-forget, and it's good for 19 year old math majors who don't want to be teachers (that literary technique is called a flashback).
In summary, PHP is no longer living. It's dead. It's good for what it does well, it's terrible for everything else, and that's not ever going to change.