Modern php code uses Frameworks, Package mangers, opcode caching, and application servers. It’s just that other languages don’t carry all the cruft php has in its heritage…
Back when I was building applications in PHP it was all frameworks. package managers, op code caching, etc. But I no longer do PHP development but for my own personal websites I still use PHP but in that most minimal form.
So where is the hyper-simple JS equivalent for that class of non-enterprise projects, is what I wonder...the enterprise stuff has always been heavy and loads projects down with maintenance debt.
I actually like using a reliable package manager, a wide ecosystem of good packages, and modern language features. There is nothing "heavy" about modern PHP, unless you want it to.
How do these change the way you can deploy PHP files by simply uploading them?
For frameworks, all you do is run a single command to install.
If you mean JS package managers, that's agnostic to what language you use.
Opcode caching doesn't require anything special from deployment point of view and I don't see a need for app server for PHP.
Once you start getting into zero-downtime deployments, you'll quickly see the need for both application servers like Swoole or RoadRunner, as well as strategies that don't leave requests in the air with half the code from the old version and the other half with the new one.
Let HackerNews hobby programmers snark all they want, those are very real problems with very real solutions.
The tendency to have a npm package for everything is overwhelming because you end up with choice paralysis and risk on picking "Oh, you picked CSV-to-array library #823, it's the buggy/insecure/unmaintained one."
… in your echo chamber. I know first hand of multiple very large corps doing that (one of them being a bank and this is their payment api) and very many smaller shops. Sure, we recommend against it, but saying it’s decades ago like that is nonsense; many people do this because it’s convenient.