Who uses PHP anyway?
Each Thursday at my office we hold a one hour ‘tech talk’ after lunch to discuss something technical of interest. These tech talks are pretty informal, it’s really just a bunch of us sitting around a projector talking shop with one person facilitating the conversation. I get a lot out of them and it’s one of the reasons I really value working at Vehikl.
This week we chose Object Calisthenics as our source material and we stepped through the list of heuristics discussing why the application of these rules tend to produce cleaner more maintainable code. Afterwards, one of our junior developers sent me a message in Slack with a screenshot from the post we were working through.
Read through the whole article this time on Object Calisthenics, and saw this… How do you feel when people say this about PHP? Is it because they’re not developing web applications? Just curious, and if you have nothing to say that’s okay too
It really kinda sucks that given the value the post delivers to its readers, this is the one thing that made enough of an impact that it caused the junior dev to ask me about it.
Here’s my reply.
People shitting on PHP isn’t going to go away, it’s a symptom of a few things.
PHP has a ridiculously flat learning curve so just about anyone can write code using it, this means a lot of amateurs and ‘get it done’ developers will choose php but won’t really ever level up their skills when it comes to software development.
PHP is ridiculously easy to deploy software with. This means that all those amateurs writing less than professional code can get their apps out into the real world. There are a lot of nasty people on the internet and these types of amateur applications are ripe for malicious attacks. This tends to give PHP a bad rap when it comes to building secure and robust applications.
Since PHP is easy to write and easy to deploy, a lot of people are trying to do that but they need help. They post to stack overflow or other message boards and other amateurs help them out with solutions that they’ve made themselves which is also amateur. So the shitty code propagates quickly and lots and lots of terrible examples are posted out there for everyone to see.
People are insecure assholes looking to make themselves feel better by shitting on people they don’t know because that’s easy and seemingly without repercussions. These are generally the same people who troll the internet wasting time and taking up space instead of building useful tools and generally being productive. Note that these trolls are shitting on people who actually are building useful tools and being productive, kinda ironic (if I know what irony means).
So how do I feel when people say shitty things about PHP? I can’t say that it doesn’t bother me because it does; it doesn’t make me angry though, it just makes me kinda sad. It makes me sad because they’re taking time out of their day to point out “if you’re doing X then you’re an idiot” and that isn’t helpful in anyway. In this particular instance, I don’t think that the author was trying to be malicious, it looks like the statement was made in jest, like they’re in on the joke that people shitting on PHP is a waste of time.
Further, learning multiple different programming languages only makes you a better developer. While the core ideas and philosophies may be the same, the ways in which they are applied tend be slightly different because different languages have different language constructs. This is why developers will ask “whats the idiomatic way to do X in Y?”. Learning new languages will expose you to these “new” ways of accomplishing common tasks. You can take these experiences back to other languages and see how well they apply. It’s a win win.