com php-src: test timeout within eval(): tests/basic/timeout_ variation_3.phpt
| From: | Anatol Belski | Date: | Mon, 16 Mar 2015 18:12:55 +0000 |
| Subject: | com php-src: test timeout within eval(): tests/basic/timeout_ variation_3.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85537@lists.php.net to get a copy of this message | ||
Commit: 7a7d8b9f9de6439a0e0a96f5ca016d8dcf7a2f52
Author: Anatol Belski <ab@php.net> Mon, 16 Mar 2015 19:12:55 +0100
Parents: 82d3a13983a64f1ef7d6c7f7e017b7f25d827a83
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7a7d8b9f9de6439a0e0a96f5ca016d8dcf7a2f52
Log:
test timeout within eval()
Changed paths:
A tests/basic/timeout_variation_3.phpt
Diff:
diff --git a/tests/basic/timeout_variation_3.phpt b/tests/basic/timeout_variation_3.phpt
new file mode 100644
index 0000000..0de4696
--- /dev/null
+++ b/tests/basic/timeout_variation_3.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Timeout within eval
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function hello ($t) {
+ echo "call", PHP_EOL;
+ sleep($t*2);
+}
+
+eval('hello($t);');
+?>
+never reached here
+--EXPECTF--
+call
+
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d