by 29athrowaway · 5y ago · 0 comments
Some of those problems got addressed but by the time that happened PHP's reputation was irreversibly trashed and now nobody wants to know about it.
That is the world we live in. People do not want to learn PHP or work in PHP. Do a survey on any higher education institution and verify it yourself.
All the features you feel proud about... go take a look at the Java VM, .NET VM or a JS VM like V8... Those VMs are much more powerful than the PHP interpreter will ever be. Even CPython is faster.
Plus, as a Java developer you can make more than a PHP developer and there are more types of development you can do. Mobile, backend, desktop. PHP is mostly limited to backend and it is not even the best solution for that.
I haven't run the tests myself in 2021, but I used to do PHP for many years, and there were significant performance improvements done in PHP which I remember took it way ahead of Python at the time.
The benchmarks I’m familiar with[1] show recent PHP releases to be a lot faster than CPython for many tasks. Are there better benchmarks I should be aware of?
[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
The majority of new programmers might not want to, but I consider it a clever strategy for new devs to get their foot in the door with their first real job. There's always a huge amount of open PHP jobs and if more elite devs are passing over those jobs then it means an opportunity for somebody. And some of those people who start with PHP will move on to more modern or better languages after they get their legs. It's a smart path to get on the dev career track, especially if you don't come from a traditional CS or dev background.
It's like building a car designed for just one thing, to go very fast on straight roads, then a general-purpose car comes along and somehow beats this car in this category.
How did it lose its grip? Did the PHP Group become too complacent being at the top?
Most general purpose languages do not have built in templating and do not have templating in their standard library.
As a programming language, many modern languages have a faster and more optimized runtime than PHP. If the Laravel authors ported their framework to Node, Python or Java it would certainly run faster.
As a templating language, it has to run on the server. That means you pay for the computing cost of templating not the end user. Unless you do your templating using a JS solution.
On top of that, you have to transfer a rendered page from your application server instead of just serving files from CDN at a fraction of the cost.
Overall, PHP is the wrong solution for the wrong problem. I used PHP in 2004 and then moved on. The industry at a large also moved on.