Re: PHP 4.0 Bug #8414: set_time_out() and max_execution_time description is not clear
| From: | Faisal Nasim | Date: | Mon, 25 Dec 2000 12:19:37 +0000 |
| Subject: | Re: PHP 4.0 Bug #8414: set_time_out() and max_execution_time description is not clear | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-42246@lists.php.net to get a copy of this message | ||
I believe sleep() causes the execution timer to sleep as well.
From the man page:
sleep() makes the current process sleep until 'seconds' seconds have
elapsed or a signal arrives which is not ignored.
Try:
<?
set_time_limit (2);
sleep (25);
print "not printed";
?>
program ends after 25 seconds with an error that 2 seconds limit
exceeded.
Faisal
At 10:55 AM 12/25/2000 +0000, omakarenko@cyberplat.ru wrote:
From: omakarenko@cyberplat.ruOperating system: linuxPHP version: 4.0.4 PHP Bug Type: Documentation problem Bug description: set_time_out() and max_execution_time description is not cleardocumentation 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 -- Edit Bug report at: http://bugs.php.net/?id=8414&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net