3 ms·
I agree, PHP employs very suicidal workers! Chromium workers die after you've closed their respective tabs. Once the page finishes loading the worker is no lon
by abestic9 14y ago
I agree, PHP employs very suicidal workers!
Chromium workers die after you've closed their respective tabs. Once the page finishes loading the worker is no longer needed, another one can pick up the next request. I've never come across the line 0 error, I don't task a single PHP script with a respectably large operation, it's not designed for that - even the default script execution timeout offers a hint.
Obviously session information and state can be stored in a cache, database or file. If you need to trigger a maintenance script create an XHR or cron job. 1x1 transparent PNGs is a horrible way to do some back-end dirty work that the client need not be associated with. If you're doing this to run DB optimization, purges or bulk emailers, you're doing it wrong.
An obscure limitation? Yes, but there are bigger issues in PHP than death-by-design.
- kaens 14y agoSure there are bigger issues, and I think this guy has correctly identified death-by-design as a large part of the reason for those issues. I'm not sure if PHP was explicitly designed to die, or if it just came out that way because that makes sense for the problem it was originally trying to solve in the context it was originally trying to solve it in. It doesn't really matter though -- the language hasn't sloughed off the nature of that original problem and its context. Your point about it being the wrong tool for those jobs is, in my opinion, correct -- on the gripping hand though, the jobs it is appropriate for are appearing less and less frequently, and the places that have PHP codebases that suddenly need to scale out and/or run long-running jobs are going to (more often than not) hammer it in to some weird mold that kinda resembles a more appropriate (but not really working) tool for that job if you squint just right. Search bugs.php.net by notabug sometime, or by wontfix, or just browse around randomly.
- mfjordvald 14y agoThe line 0 error happens when you try to throw an exception in a destructor.