News for hackers. Stuff that matters.
Re:Functional PHP by anon7000 on Sunday October 13, 2024 @11:43AM (#41828949)
I mean, there are tradeoffs with both approaches. It seems to me that Node’s stateful approach is used by other web servers and languages too.

The main tradeoff is you’re now reloading the entire server for every request in PHP. If you have a massive server or framework, that might not be the fastest thing in the world.

Re:Functional PHP by rob-olmos on Monday October 14, 2024 @02:09PM (#41840181)
Since php 7.4 there's been opcache preload to keep a lot of the framework instantiated, in php 8.1 opcache inheritance cache covered some ground with preload.

Some frameworks like symfony considered removing preload support but they were still seeing benchmarks of 10% better performance with it so it was kept.

The biggest pain point with preload IMO is it's global, not per pool, and php-fpm needs to be restarted to update the preload script.