Re: Timeout Function

From: Date: Tue, 24 Apr 2001 20:53:06 +0000
Subject: Re: Timeout Function
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-52310@lists.php.net to get a copy of this message
> I would like to see a timeout function implemented in PHP (something like > Perl's alarm function would be perfect). I notice there is a > set_time_limit() function in PHP, but it cannot be applied to a specified > block of code (it applies to the entire script) and it causes a fatal error > when the timeout is reached (instead of letting you run some alternate code > if the timeout is reached). That's not true. If you use register_shutdown_function() then this function you register will be run once the timeout hits. See the chapter in the manual on connection handling. -Rasmus

« previous php.dev (#52310) next »