diff options
| author | Anatol Belski <ab@php.net> | 2015-03-16 19:28:01 +0100 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-03-16 19:28:01 +0100 |
| commit | b05635ade90b37d5f3a47d7bccadda8db03cdea8 (patch) | |
| tree | a30c3b30137a629624be884dbe3863f9bec71876 /tests/basic | |
| parent | eab7da4bc91a60220bc8c6a208de1d324a7529aa (diff) | |
| download | php-git-b05635ade90b37d5f3a47d7bccadda8db03cdea8.tar.gz | |
test timeout with for loop
Diffstat (limited to 'tests/basic')
| -rw-r--r-- | tests/basic/timeout_variation_7.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_7.phpt b/tests/basic/timeout_variation_7.phpt new file mode 100644 index 0000000000..35852e7495 --- /dev/null +++ b/tests/basic/timeout_variation_7.phpt @@ -0,0 +1,18 @@ +--TEST-- +Timeout within for loop +--FILE-- +<?php + +$t = 3; +set_time_limit($t); + +for($i = 0; $i < 42; $i++) { + echo 1; + sleep(1); +} + +?> +never reached here +--EXPECTF-- +111 +Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d |
