summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/timeout_variation_4.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_4.phpt b/tests/basic/timeout_variation_4.phpt
new file mode 100644
index 0000000000..053a33af4d
--- /dev/null
+++ b/tests/basic/timeout_variation_4.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Timeout within call_user_func
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function hello ($t) {
+ echo "call", PHP_EOL;
+ sleep($t*2);
+}
+
+call_user_func('hello', $t);
+
+?>
+never reached here
+--EXPECTF--
+call
+
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d