mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
MFH: Add test for the timeout inside shutdown function
This commit is contained in:
parent
2d6377e322
commit
61bbd8af75
23
tests/lang/045.phpt
Normal file
23
tests/lang/045.phpt
Normal file
@ -0,0 +1,23 @@
|
||||
--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
|
Loading…
Reference in New Issue
Block a user