test timeout within function

This commit is contained in:
Anatol Belski 2015-03-16 19:01:23 +01:00
parent 394bd2ab41
commit f591c0dff8

View File

@ -0,0 +1,21 @@
--TEST--
Timeout within function
--FILE--
<?php
$t = 3;
set_time_limit($t);
function hello ($t) {
echo "call";
sleep($t*2);
}
hello($t);
?>
never reached here
--EXPECTF--
call
Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d