summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-16 19:16:09 +0100
committerAnatol Belski <ab@php.net>2015-03-16 19:16:09 +0100
commit8f1fa842cd7248e9b4faf8a9f426d9a83b3c468e (patch)
tree51f1fd8131711732a1aa059dc3e92f06b5af5baa /tests
parent7a7d8b9f9de6439a0e0a96f5ca016d8dcf7a2f52 (diff)
downloadphp-git-8f1fa842cd7248e9b4faf8a9f426d9a83b3c468e.tar.gz
fix timeout with cal_user_func
Diffstat (limited to 'tests')
-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