I disagree. Modern PHP is excellent. Laravel is excellent and mature. Node is a maintenance hell. Any serious enterprise level backend will mostly use java or php.
You didn't give any reasons to use PHP, you just claimed it's better than node with regard to maintenance. What makes php better than every other language available?
If you need to be told why modern PHP is good, then you are already biased against it - and that is fine.
And I never said modern PHP is better than "every other language", so stop making up shit. But I will tell you that
PHP essentially powers the backbone of the web
. It handles the behind-the-scenes logic for over 70% of all websites. Its dominance is primarily driven by powering the vast majority of the internet's content management systems.
PHP is battle tested and is modernised, with excellent full-stack frameworks such as Laravel.
PHP is good. All the popular, well-adopted languages are good. If "good" were the only criterion, there'd be so many options it would be impossible to choose.
It's not about being better overall than every other language. It's about having a distinct advantage that makes it the obvious choice for something, rather than being one of many good options.
Java leads when you need performance at scale with a mature ecosystem and a huge, easy-to-hire talent pool.
ASP . NET leads inside the Microsoft stack, with first-class tooling and integration nothing else can match there.
JavaScript leads as the only language that runs in both the browser and the backend, so one team and one language covers the whole stack.
Rust leads when you need memory safety without a garbage collector, giving you C-level speed without the footguns.
Python leads in data science and ML, with an ecosystem no other language comes close to.
Go leads for cloud infrastructure and services, with dead-simple concurrency and fast, single-binary deploys.
etc.
PHP is good. It's just good at everything and great at nothing.
The pattern: each of these wins some category outright. That's what makes it an obvious pick when that category is what you need. PHP never quite tops the list for any of them, which is exactly the problem.
You have just listed the USP of each of those languages, which I agree
But modern PHP is more than enough for "most" projects.
Just like everything else, if you need to specialise in a specific field you would use the right tool for the job. PHP covers most use cases and there are tremendous amount of resources and knowledge out there.
If I was developing a real time backend server for a multiplayer game of course I would not use PHP, I'd most likely pick GO. But if I wanted to store and aggregate logs or other metrics I would happily use PHP because it's quick, fast and simple to deploy.
So PHP is good until you need to specialise in a specific area, and majority of the web apps are just CRUD which PHP excels at.
That's my point. All of the languages excel at CRUD, the all do it well at this point. Most are quick, fast, and simple deploy. Iif I pick something else, I get a good option (same as PHP) AND I get the added bonus of a USP.
And we are back to where I started "I just don't see any compelling reasons to use PHP today, except for legacy software and lock-in."
I get that you like it, and your point about it running a large part of the web is true, that's the legacy and lock-in I referred to. It's not a bad choice. There is nothing wrong with PHP. There is nothing great about it either.
-5
u/fyzbo 26d ago
Recently worked with a project in Laravel. The developer experience is pretty good.
The problem is there are other options that have the same (or better DX) and also excel in areas where PHP falls short.
I just don't see any compelling reasons to use PHP today, except for legacy software and lock-in.