summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/timeout_variation_8.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_8.phpt b/tests/basic/timeout_variation_8.phpt
new file mode 100644
index 0000000000..dfb2d2e69e
--- /dev/null
+++ b/tests/basic/timeout_variation_8.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Timeout within foreach loop
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+foreach(range(0, 42) as $i) {
+ echo 1;
+ sleep(1);
+}
+
+?>
+never reached here
+--EXPECTF--
+111
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d