On 10 Oct 2014, at 13:31, Patrick Schaaf <b...@bof.de> wrote: > I would love to be able to catch, at toplevel. with an error handler or > otherwise, both the memory limits exceeded and time limit exceeded cases. > > These two safeguards, by themselves, are not instabilities, right? The > limits could be set a bit higher and everything would continue normally, > right?
Both are problematic. There’s no *technical* reason to prevent catching the exceeding of the time limit… but that means you can circumvent the time limit. That’s bad. Perhaps you could catch it and have a short window to output an error and die, though? Memory limit catching *would* cause instability, though. That’s an error thrown during memory allocation. Things will break horribly if it just returns NULL and carries on, because let’s be realistic here, an awful lot of code doesn’t check for NULL return values. It’ll lead to a segfault. PHP must bail out immediately when this happens to prevent segfaulting. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php