summaryrefslogtreecommitdiff
path: root/tests/func
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-01-23 03:28:41 +0000
committerfoobar <sniper@php.net>2003-01-23 03:28:41 +0000
commit80923f933d21f7ad01f98c8059b40c9d340e1e92 (patch)
treefe71da7383b75e0335f5721e30e3e915db743802 /tests/func
parentae55ffe7bf32f198b9a76622ee8fe742025f2377 (diff)
downloadphp-git-80923f933d21f7ad01f98c8059b40c9d340e1e92.tar.gz
Added test for bug: #21513
Diffstat (limited to 'tests/func')
-rw-r--r--tests/func/005a.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/func/005a.phpt b/tests/func/005a.phpt
new file mode 100644
index 0000000000..92173c2579
--- /dev/null
+++ b/tests/func/005a.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Testing register_shutdown_function() with timeout. (Bug: #21513)
+--POST--
+--GET--
+--FILE--
+<?php
+
+ini_set('display_errors', 0);
+
+echo "Start\n";
+
+function boo()
+{
+ echo "Shutdown\n";
+}
+
+register_shutdown_function("boo");
+
+/* not necessary, just to show the error sooner */
+set_time_limit(1);
+
+/* infinite loop to simulate long processing */
+for (;;) {}
+
+echo "End\n";
+
+?>
+--EXPECT--
+Start
+Shutdown