diff options
author | Anatol Belski <ab@php.net> | 2015-03-16 19:05:21 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-03-16 19:05:21 +0100 |
commit | 82d3a13983a64f1ef7d6c7f7e017b7f25d827a83 (patch) | |
tree | 559a91d920dfce273ef7c98cc6c97887e4665a21 /tests | |
parent | f591c0dff884190f23ed122668684978a7b13c1f (diff) | |
download | php-git-82d3a13983a64f1ef7d6c7f7e017b7f25d827a83.tar.gz |
test timeout with array_walk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/timeout_variation_2.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_2.phpt b/tests/basic/timeout_variation_2.phpt new file mode 100644 index 0000000000..b374e9c684 --- /dev/null +++ b/tests/basic/timeout_variation_2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Timeout within array_walk +--FILE-- +<?php + +$t = 3; +set_time_limit($t); + +function cb(&$i, $k, $p) +{ + echo 1; + sleep(1); +} + +$a = array(1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1); +array_walk($a, "cb", "junk"); + +?> +never reached here +--EXPECTF-- +111 +Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d |