Yes, PHP sucks, but it works

Jeff Atwood had a really great blog entry on PHP the other day. I think the title pretty much sums up the way I feel about it: PHP Sucks, But It Doesn't Matter.

I've been working with PHP for about 3 or 4 years now. For the last 9 months, writing PHP code has been my day job. And I've got to tell you, PHP really is kind of a crappy language. It's so bad you can't even complain that PHP was poorly designed, because it quite clearly wasn't designed. In fact, I'm not even so sure it "evolved." Sometimes it seems like it just sort of mutated.

So, as Jeff said, nobody with an ounce of programming talent could thing that PHP is a "good" language in any objective sense. It's just too hacked-up and thrown together. It's the Visual Basic 6 of the web. God knows much of the PHP code you find on the net is every bit as terrible as the VB6 code you find. In fact, when you consider ill-conceived "features" like safe mode and magic quotes, it even starts to make VB6 look good.

But all that is really beside the point. At the end of the day, PHP does the job. It might not have the orgasm-inspiring elegance of Ruby, but does it really need that? These days, PHP has all the big features - decent object-orietation, a rich standard library including decent XML handling and database access layers, and a number of good MVC frameworks. In short, it has what it needs to allow decent developers to write good, solid, maintainable code. PHP doesn't lend itself to elegance, but in the right hands, it can be elegant enough. And really, that's all that matters.

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.