Edit report at http://bugs.php.net/bug.php?id=26024&edit=1

 ID:                 26024
 Updated by:         [email protected]
 Reported by:        seventhcycle at yahoo dot com
 Summary:            Add function handler for set_time_limit()
-Status:             Open
+Status:             Bogus
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 Operating System:   linux
 PHP Version:        4.3.3
 Block user comment: N
 Private report:     N

 New Comment:

Use register_shutdown_function() together with connection_status(). See
also: 



  http://www.php.net/manual/en/features.connection-handling.php


Previous Comments:
------------------------------------------------------------------------
[2003-10-28 18:45:37] seventhcycle at yahoo dot com

Description:
------------
It would be nice to have an optional function handler for when
set_time_limit() goes over the set amount of time.

Reproduce code:
---------------
<?



   set_time_limit(30, "errfunc");

   while(1) { $g=1; }



   function errfunc()

   {

      echo "Hey, this is taking too long!";

      exit;

   }

?>

Expected result:
----------------
After 30 seconds, errfunc() is called, and the program executes
gracefully, without an error message and a line number.



This would be useful, say, if doing a merchant transaction with a
separate server and it's stalling on giving a response.

Actual result:
--------------
Hey, this is taking too long


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=26024&edit=1

Reply via email to