diff options
| author | Anatol Belski <ab@php.net> | 2015-03-16 19:01:23 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-03-16 19:01:23 +0100 |
| commit | f591c0dff884190f23ed122668684978a7b13c1f (patch) | |
| tree | 220eda9dcb288948820ca46712adc792527d03e2 /tests | |
| parent | 394bd2ab4128ec4551ddfa097a52689d38aa530f (diff) | |
| download | php-git-f591c0dff884190f23ed122668684978a7b13c1f.tar.gz | |
test timeout within function
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basic/timeout_variation_1.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_1.phpt b/tests/basic/timeout_variation_1.phpt new file mode 100644 index 0000000000..63c641d757 --- /dev/null +++ b/tests/basic/timeout_variation_1.phpt @@ -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 |
