Comment by sam_lowry_
8 hours ago
One thing PHP got right is its 'PHP must die' mode of operation where every request spawns a new process (ok, not a process anymore but still an isolated execution environment that lasts until the response is served.
Java, Ruby, C#, etc are application servers and this massively complicates everything.
Maybe I was holding it wrong but I found a new Laravel project out of the box takes notable time to respond to hello world HTTP requests, and to me it looks like all the time is spent loading code on each request.
I have heard a lot of praise for both laravel and php and I still reserve judgement, but since trying it out I take all the performance claims one way or another with 100% my daily recommended intake of salt.
Maybe I was holding it wrong but I found a new Laravel project out of the box takes notable time to respond to hello world HTTP requests, and to me it looks like all the time is spent loading code on each request
The one-process-per-request model, even with php-fpm and other optimisations, it’s incredibly expensive to scale.
Modern java on a recent jvm (>=17) is incredibly scalable in comparison.
I understand your technical argument.
However.
I've spent many years doing PHP and Java-based development. Often times in parallel, having PHP projects on the side and earning money in Java development.
At some point, I had a stint of several years doing exclusively PHP-based work.
Every single time, my PHP projects were serving orders of magnitude more people orders of magnitude cheaper than Java-based projects.
And when I say "orders of magnitude", it is not an exaggeration but sad truth.
I am now in the Java land again, because pay is better. My current project has already burnt several millions serving 20 secretaries that handle 1000 individual cases each year.
My mind is with the PHP project I sold several years ago when it was serving 120,000 people at the cost of a few hundred euros per year + my labor, which was essentially free, but if I could slap my usual daily rate on it, it would still be somewhere between 20,000 and 30,000€/year.