Although it doesn't let you recover from a timeout, you could use
register_shutdown_function to gracefully exit after a fatal error.

register_shutdown_function(function(){
    $error = error_get_last();
    if($error && $error['type'] === E_ERROR){
        echo 'PHAIL! Oh noes, something went wrong!';
        // do whatever else you need to do before quitting
    }
});

Cheers,
David

On 08/03/11 22:39, Pierre Joye wrote:
> hi,
>
> is not the goal of this setting to prevent that a script runs longer
> than a given time? A catchable error will prevent that to happen.
>
> On Tue, Mar 8, 2011 at 2:05 PM, Sebastian Bergmann <sebast...@php.net> wrote:
>>  Could set_time_limit() be changed in such a way that it triggers a
>>  catchable fatal error instead of a fatal error? Thanks!
>>
>> --
>> Sebastian Bergmann                    Co-Founder and Principal Consultant
>> http://sebastian-bergmann.de/                           http://thePHP.cc/
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>


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

Reply via email to