summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-16 19:01:23 +0100
committerAnatol Belski <ab@php.net>2015-03-16 19:01:23 +0100
commitf591c0dff884190f23ed122668684978a7b13c1f (patch)
tree220eda9dcb288948820ca46712adc792527d03e2 /tests
parent394bd2ab4128ec4551ddfa097a52689d38aa530f (diff)
downloadphp-git-f591c0dff884190f23ed122668684978a7b13c1f.tar.gz
test timeout within function
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/timeout_variation_1.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_1.phpt b/tests/basic/timeout_variation_1.phpt
new file mode 100644
index 0000000000..63c641d757
--- /dev/null
+++ b/tests/basic/timeout_variation_1.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Timeout within function
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function hello ($t) {
+ echo "call";
+ sleep($t*2);
+}
+
+hello($t);
+
+
+?>
+never reached here
+--EXPECTF--
+call
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d