]> granicus.if.org Git - php/commitdiff
fix timeout with cal_user_func
authorAnatol Belski <ab@php.net>
Mon, 16 Mar 2015 18:16:09 +0000 (19:16 +0100)
committerAnatol Belski <ab@php.net>
Mon, 16 Mar 2015 18:16:09 +0000 (19:16 +0100)
tests/basic/timeout_variation_4.phpt [new file with mode: 0644]

diff --git a/tests/basic/timeout_variation_4.phpt b/tests/basic/timeout_variation_4.phpt
new file mode 100644 (file)
index 0000000..053a33a
--- /dev/null
@@ -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