PHP 4.0 Bug #8414 Updated: set_time_out() is acting inconsistantly

From: Date: Sat, 07 Apr 2001 06:10:03 +0000
Subject: PHP 4.0 Bug #8414 Updated: set_time_out() is acting inconsistantly
Groups: php.dev 
Request: Send a blank email to php-dev+get-51099@lists.php.net to get a copy of this message
ID: 8414 Updated by: danbeck Reported By: omakarenko@cyberplat.ru Status: Open Old-Bug Type: Documentation problem Bug Type: Performance problem Assigned To: Comments: I'm re-filing this as a bug report. It appears that set_time_out() is acting inconsistant. The following code stops after 5 seconds as you would expect: set_time_limit(5); while(1) { $i++; } While this code continues executing indefinitely: set_time_limit(5); while(1) { $i++; echo "$i\n"; } Previous Comments: --------------------------------------------------------------------------- [2000-12-25 05:55:38] omakarenko@cyberplat.ru documentation is not clear enough on what "excecution time" the max_execution_parameter does limit. try the following: <?php set_time_limit(1); while(1) sleep(1); ?> on my machine that runs much more then one second, while: <?php set_time_limit(1); while(1); ?> stops after 1 second as expected. That difference is never mentioned in documentaion. While the usage of PROF timer make sence sometimes the parameter name "max_execution_time" suggests the "real" time limit so that <?php set_time_limit(30); sleep(3600); ?> should be terminated on timeout after 30 seconds. oleg --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8414&edit=2

« previous php.dev (#51099) next »