←back to thread

123 points jonfelsar | 2 comments | | HN request time: 0s | source
Show context
dingdingdang ◴[] No.45189044[source]
The point made in the article:

* resource leaks are non-existent

Can not be emphasized enough imo. The amount of absolute ridiculous levels of pain instigated by expecting a core code loop to run -forever- and doing so well while being written for some web project or other is just too much to fathom. Just use PHP and serve the request. Then let it die. Then serve a new request.

replies(7): >>45189095 #>>45189147 #>>45189280 #>>45189375 #>>45189453 #>>45189777 #>>45194297 #
johntash ◴[] No.45194297[source]
One of my biggest issues with php was the number of imports and file reads involved. It made running something like wordpress _really_ slow on slow disks or over nfs. I don't remember apcu or opcache helping much for that because I think it still did a stat on every file iirc.

For single-file php apps or just not using a big framework, it's not really a problem.

replies(1): >>45194529 #
1. spdionis ◴[] No.45194529[source]
You can configure opcache to never stat unless it's reloaded
replies(1): >>45202933 #
2. johntash ◴[] No.45202933[source]
Huh, well that sounds like it would have been useful. It's been at least 10 years since I did any php dev work, but maybe I'll find an excuse to use it again for something.