mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
test timeout with shutdown function
This commit is contained in:
parent
33d832bd45
commit
1d6f94eeef
21
tests/basic/timeout_variation_9.phpt
Normal file
21
tests/basic/timeout_variation_9.phpt
Normal file
@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Timeout within shutdown function
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$t = 3;
|
||||
set_time_limit($t);
|
||||
|
||||
function f()
|
||||
{
|
||||
echo "call";
|
||||
sleep(4);
|
||||
}
|
||||
|
||||
register_shutdown_function("f");
|
||||
exit(0);
|
||||
?>
|
||||
never reached here
|
||||
--EXPECTF--
|
||||
call
|
||||
Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d
|
Loading…
Reference in New Issue
Block a user