]> granicus.if.org Git - php/commitdiff
test timeout within while loop
authorAnatol Belski <ab@php.net>
Mon, 16 Mar 2015 17:58:32 +0000 (18:58 +0100)
committerAnatol Belski <ab@php.net>
Mon, 16 Mar 2015 17:58:32 +0000 (18:58 +0100)
tests/basic/timeout_variation_0.phpt [new file with mode: 0644]

diff --git a/tests/basic/timeout_variation_0.phpt b/tests/basic/timeout_variation_0.phpt
new file mode 100644 (file)
index 0000000..31c878d
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--
+Timeout within while loop
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+while(1) { 
+       echo 1; 
+       sleep(1);
+}
+
+?>
+never reached here
+--EXPECTF--
+111
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d