cvs: php-src /tests/lang 045.phpt
| From: | Etienne Kneuss | Date: | Sun, 31 May 2009 21:32:20 +0000 |
| Subject: | cvs: php-src /tests/lang 045.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-58435@lists.php.net to get a copy of this message | ||
colder Sun May 31 21:32:20 2009 UTC
Added files:
/php-src/tests/lang 045.phpt
Log:
Add test for the timeout inside shutdown function
http://cvs.php.net/viewvc.cgi/php-src/tests/lang/045.phpt?view=markup&rev=1.1
Index: php-src/tests/lang/045.phpt
+++ php-src/tests/lang/045.phpt
--TEST--
Timeout again inside register_shutdown_function
--FILE--
<?php
set_time_limit(1);
register_shutdown_function("plop");
function plop() {
$ts = time();
while(true) {
if ((time()-$ts) > 2) {
echo "Failed!";
break;
}
}
}
plop();
?>
===DONE===
--EXPECTF--
Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
Fatal error: Maximum execution time of 1 second exceeded in %s on line %d