> What do you mean by "no option"? Otherwise yes, that's what it does.
Using sleep there is not a good practice.  Since the custom error
handler is triggered, there is no need for the sleep call anyways.

> I'm not sure I understand. Are you implying that it is somehow
> possible to circumvent the second (fatal) error with this change? How?

Consider for a second what you are asking the language to do.  The
script has run out of memory and instead of halting you want it to
switch into an error handler to log the error.  What happens when that
error handler creates new variables or an object instance?  Where does
that memory come from?

A better solution: generate a warning for scripts that use some target
% of memory.  I hate to add more ini settings, but for simplicity
there could be a "memory_limit_warn" setting which you can set to
something like "95%".  When a script reaches that memory threshold it
can trigger a warning so you can log it.

-- 
Herman Radtke
hermanrad...@gmail.com | http://hermanradtke.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to