com php-src: test timeout within function: tests/basic/timeout _variation_1.phpt
| From: | Anatol Belski | Date: | Mon, 16 Mar 2015 18:01:23 +0000 |
| Subject: | com php-src: test timeout within function: tests/basic/timeout _variation_1.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85538@lists.php.net to get a copy of this message | ||
Commit: f591c0dff884190f23ed122668684978a7b13c1f
Author: Anatol Belski <ab@php.net> Mon, 16 Mar 2015 19:01:23 +0100
Parents: 394bd2ab4128ec4551ddfa097a52689d38aa530f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f591c0dff884190f23ed122668684978a7b13c1f
Log:
test timeout within function
Changed paths:
A tests/basic/timeout_variation_1.phpt
Diff:
diff --git a/tests/basic/timeout_variation_1.phpt b/tests/basic/timeout_variation_1.phpt
new file mode 100644
index 0000000..63c641d
--- /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