summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-16 19:35:36 +0100
committerAnatol Belski <ab@php.net>2015-03-16 19:35:36 +0100
commit1d6f94eeefb6ca3858230a6225b1245b863b91f1 (patch)
treef97084713d8ed34f6b808028504430e27daa8a90 /tests/basic
parent33d832bd45978ca1f36d9db2d1341683f9ed786c (diff)
downloadphp-git-1d6f94eeefb6ca3858230a6225b1245b863b91f1.tar.gz
test timeout with shutdown function
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/timeout_variation_9.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_9.phpt b/tests/basic/timeout_variation_9.phpt
new file mode 100644
index 0000000000..f51c439eea
--- /dev/null
+++ b/tests/basic/timeout_variation_9.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Timeout within shutdown function
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function f()
+{
+ echo "call";
+ sleep(4);
+}
+
+register_shutdown_function("f");
+exit(0);
+?>
+never reached here
+--EXPECTF--
+call
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d