diff options
| author | Anatol Belski <ab@php.net> | 2015-03-16 19:12:55 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-03-16 19:12:55 +0100 |
| commit | 7a7d8b9f9de6439a0e0a96f5ca016d8dcf7a2f52 (patch) | |
| tree | be00194c0f4234cc99401a1415b3895f5e004d8e /tests/basic | |
| parent | 82d3a13983a64f1ef7d6c7f7e017b7f25d827a83 (diff) | |
| download | php-git-7a7d8b9f9de6439a0e0a96f5ca016d8dcf7a2f52.tar.gz | |
test timeout within eval()
Diffstat (limited to 'tests/basic')
| -rw-r--r-- | tests/basic/timeout_variation_3.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_3.phpt b/tests/basic/timeout_variation_3.phpt new file mode 100644 index 0000000000..0de46963d8 --- /dev/null +++ b/tests/basic/timeout_variation_3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Timeout within eval +--FILE-- +<?php + +$t = 3; +set_time_limit($t); + +function hello ($t) { + echo "call", PHP_EOL; + sleep($t*2); +} + +eval('hello($t);'); +?> +never reached here +--EXPECTF-- +call + +Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d |
