summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-16 19:21:58 +0100
committerAnatol Belski <ab@php.net>2015-03-16 19:21:58 +0100
commit1c0fce922ec5549bc127ad1238036e5d084f096c (patch)
tree8d76eac9cc8fab812df1ad752f79936aa7dc35b8 /tests/basic
parent8f1fa842cd7248e9b4faf8a9f426d9a83b3c468e (diff)
downloadphp-git-1c0fce922ec5549bc127ad1238036e5d084f096c.tar.gz
test timeout with exception
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/timeout_variation_5.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_5.phpt b/tests/basic/timeout_variation_5.phpt
new file mode 100644
index 0000000000..e4ccfffa58
--- /dev/null
+++ b/tests/basic/timeout_variation_5.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Timeout within function containing exteption
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function f($t) {
+ echo "call";
+ sleep($t*2);
+ throw new Exception("never reached here");
+}
+
+f($t);
+?>
+never reached here
+--EXPECTF--
+call
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d