Welcome to AboutHalf

menu - http://abouthalf.com

Previously, on PHP

There is some drama in the PHP blogger-nets.

First there was: PHP: a fractal of bad design

Then there was: The PHP Singularity

And also: PHP is much better than you think

The first article is a well formed rant about how sloppy PHP is as a programming language. The second is a call to action for developers to build compelling alternatives on things that aren’t PHP. The third is a defense of PHP, pointing out all the growth and refinement in recent versions and all the great tools available now and on the horizon. All interesting in that they are chock full of True Facts™ even though they arrive at different conclusions.

All this kerfuffle is conveniently timed to coincide with my own PHP doldrums. I think that to truly understand the pain of PHP you have to work in it professionally for a couple of years. You start to find the real pain points after you work on a large complex app or site.

Sure, the language is terrible. Just look at how many native array functions there are. Why does this even exist? But that’s not the problem. Google exists. If I don’t know the right way to do whatever in PHP, I can find it quickly and move on. After a while you learn to avoid the common gotchas. When one slips by…it’s easy to laugh “ha ha PHP is dumb” and move on. If you’re using a good IDE, like PHP Storm, a lot of the suck is mitigated.

What I find, though, is the slow grind of bad tooling and manual labor. Deployments are hard. Migrating is hard. Dependency management is hard. There’s so much boilerplate code. It’s all the stuff Ruby and Java devs take for granted. It’s all those things Fabian Potencier (PHP is much better than you think) labels in his articles as ‘next challenge’. And he’s right. Lot’s of good things have been happening in the PHP world recently. Silex is a breath of fresh air. Composer is lovely. If, today, you wanted to start with a fresh, clean PHP 5.4 application. You would use Silex or Symfony. You would manage your dependencies with Composer. Your ORM would be Doctrine. And you know what? It would be OK. Your hosting plan would probably be cheap too.

But none of these things help if you’re marooned on a big Zend Framework application, or you’re on a Drupal or WordPress chain gang. And that is where a lot of professional PHP devs find themselves, and why they are calling for mutiny.