]> granicus.if.org Git - php/commitdiff
Add a test for hard_timeout(bug #74093)
authorXinchen Hui <laruence@gmail.com>
Wed, 15 Feb 2017 05:51:45 +0000 (13:51 +0800)
committerXinchen Hui <laruence@gmail.com>
Wed, 15 Feb 2017 05:51:45 +0000 (13:51 +0800)
Zend/tests/bug74093.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug74093.phpt b/Zend/tests/bug74093.phpt
new file mode 100644 (file)
index 0000000..91b4981
--- /dev/null
@@ -0,0 +1,18 @@
+--TEST--\r
+Bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)\r
+--SKIPIF--\r
+<?php\r
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");\r
+?>\r
+--INI--\r
+memory_limit=1G\r
+max_execution_time=1\r
+hard_timeout=1\r
+--FILE--\r
+<?php\r
+$a1 = range(1, 100000);\r
+$a2 = range(100000, 999999);\r
+array_intersect($a1, $a2);\r
+?>\r
+--EXPECTF--\r
+Fatal error: Maximum execution time of 1+1 seconds exceeded (terminated) in %sbug74093.php on line %d\r