test timeout with shutdown function

This commit is contained in:
Anatol Belski 2015-03-16 19:35:36 +01:00
parent 33d832bd45
commit 1d6f94eeef

View 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