mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
test timeout within function
This commit is contained in:
parent
394bd2ab41
commit
f591c0dff8
21
tests/basic/timeout_variation_1.phpt
Normal file
21
tests/basic/timeout_variation_1.phpt
Normal 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
|
Loading…
Reference in New Issue
Block a user