Matula's Page

View on GitHub Twitter

PHP Doesn't "Suck"... YOU Suck

Another day, another "PHP is fine for some, but we all know how horrible it really is" post. This time from Coding Horror.

What's depressing is not that PHP is horribly designed. Does anyone even dispute that PHP is the worst designed mainstream "language" to blight our craft in decades? What's truly depressing is that so little has changed.

It's these kind of comments that make me realize this person doesn't really use PHP. At least not for a significant amount of time in the recent years. PHP 5.3 and above is amazing. There is literally nothing that you can do in one scripting language that you can't do in PHP. And yes, I dispute about the badness of its design. Maybe in versions 4 and below... but PHP 5 is very well designed, and 5.3 is leaps and bounds above that.

PHP is the Nickelback of programming languages.

I disagree. I would put forth that PHP is actually the Coldplay of languages. Their music is actually a lot better than when they started, but because they got super popular, the "hipster/indie" kids stopped liking them... and they're instead programming in Bon Iver... or something.

The best way to combat something as pervasively and institutionally awful as PHP is not to point out all its (many, many, many) faults, but to build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible.

This is fine. But with the YEARS of talk about how horrible PHP is, no one has done it. With PHP, I can open my text editor, hack in some code, FTP it to my server, and go to "whatever.php" and see it work. No other language can do that, with the exception of Classic ASP. And you know why no one has done it? Because PHP already solved that problem.

Coming on the heels of that post is another "I'll say a few nice things about PHP, but I really hate it" post... this time from Marco Arment. This seems to be a running theme in posts about PHP... essentially, "PHP really sucks, but I use it everyday and it's fine". I don't understand that attitude... if you think it sucks, stop using it. If you use it "because that's what clients want", then you're just part of the problem. Interestingly, Marco kind of contradicts himself from a previous post:

There's only so much time in the day, and only so many days in our lives. There's enough great work out there that you don't need to waste any time with anything that isn't great. ... Life's too short to drink bad coffee or read bad blogs. Make the effort to care.

And I would add "life's too short to program in a language that you think sucks". But the thing is, PHP does NOT suck. It's wonderful and fun to program in, and can do anything I want. And wonderful things are being built with it. Like my new person fav, the Laravel framework. I make no apologies... or back-handed compliments. I love PHP, and I will continue to program in it.