Hacker News new | ask | show | jobs
by rabuse 2025 days ago
This seems to be an unpopular opinion in the tech world, but I honestly enjoy working with PHP. It's such a simple, robust language, and you can use it in many different ways, depending on what you're building (OOP, scripting, microservices, etc).
4 comments

20 years for me, for sure. Maybe a touch longer.

I love it. My professional career moved to .NET and Python over the last decade, but if I'm building for myself, I build in PHP.

Whatever foibles people claim are in PHP are really just personal gripes about features they don't like, while ignoring all the other pieces that are ideal for web API development. Frankly, I believe first-class duck-typing and nearly-zero impedance with JSON make PHP a first-class citizen of the web. Duck-typing pairs so well with dynamic typing that I don't know why so many languages abuse themselves with the alternatives.

I remember the Docker switchover being very confusing. Why do all these people need such elaborate instrumentation around their development environments? With PHP, the kitchen sink is always there, and always consistent (we'll ignore money_format() for now). Once I really started using other language environments, the pain points that necessitated Docker cropped up, and of course the deployment benefits are excellent. It was just a very confusing couple years trying to figure out why the Node and Python guys were living like animals.

Anyways, cheers to another 20.

I'm with you. 10 years ago I was doing moderate 'shell scripting' type stuff in PHP - if I needed to scan a dir, parse some files, etc. PHP seems usually far more useful than trying to shoehorn the problem in to bash. And... writing shell scripts in Java ain't ever going to be a thing.
For general scripting where bash is a poor fit PHP and Ruby remain pretty solid to this day and I like them for that.

For web development though, not really. Elixir is much better there and I am saying this as a guy who had 8 years with Java and 6.5 years with Ruby on Rails (and consulted and helped 10+ PHP and JS projects in the meantime).

It's a technology that mostly gets out of the way and allows you to get stuff done, even fairly quickly.
I think the design of PHP the environment is brilliant: no state, requesting a url just executes a file. So simple and solid.

That being said, at some point in 2010-2015 timeline it became essential to master Javascript to do anything good on the web, and so it became a diversion of precious resources to continue to invest in PHP as well.

Instead the progression has just been to recreate the PHP high level architecture in Javascript/nodejs.

So we took the best parts of PHP and brought them to NodeJs land, and then you can cut your costs because you don't have to learn or invest in the full PHP stack.

Is NodeJS on the server side faster or lower memory? Because the tooling feels heavier with node modules breaking out thousands of files.

I imagine async of Node may help somewhat.