mrkrstphr's blog

twitter github

Yes, I Develop in PHP. Deal with it.

Posted on 25 Mar 2014

A coworker of mine recently went to an all day, general development conference here in town. The conference covered all sorts of topics, from Git, to APIs, to remote pair programming, to front-end JavaScript libraries, with a few .NET specific talks sprinkled in.

In between talks and during lunch, she took time to mingle and talk with other developers, and there was one prevailing, common thread among the conversations: people giving her shit and laughing at her when she said she developed in PHP.

This totally flabbergasts me. To laugh at someone simply because of their choice of programming language? To assume, wrongly, that all code written by that person MUST be terrible just because of the language they program in?

That’s bullshit.

At one point, she even egged them on, after which the guy asked “do you know what OOP means?” Seriously?

Not only do we program object-oriented applications, but we have a strong adherence to SOLID principles, as well as following design patterns and best practices, and adhering to the Clean Architecture so that our code is so amazingly decoupled, you could swap out just about any library or layer for another implementation, and shit doesn’t break.

We also test the crap out of our code, have quality control mechanisms in place through a build server and a rigid code review/pull request process.

I bet our code looks, functions, and survives 10 times better more than half the people who wrote in Java and .NET that gave her a hard time.

Look, I understand PHP has a bad public image. It’s low entry barrier as well as it’s ability to allow you to do either procedural, functional or object oriented programming makes for some pretty awful code snippets all over the web. But you can find the same shitty code written in any language. Trust me. I’ve interviewed and reviewed code samples of Java and .NET developers that stunk to high heaven.

Stop giving people shit just because they program in PHP. Find out what they do, how they do it, what practices they follow, where they came from, and then make assumptions of their code based on that. And then, and only then, decide if you want to be an asshole and try to ridicule them.

I develop in PHP. Potentially just as good or better than you. Deal with it.


The Clean Architecture in PHP

I've written a book on the Clean Architecture in PHP, which covers how to cleanly organize and decouple your code in a way that prepares it to survive and be easy to maintain for the long term.

Check it out!