summaryrefslogtreecommitdiff
path: root/tests/lang/045.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/045.phpt')
-rw-r--r--tests/lang/045.phpt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/lang/045.phpt b/tests/lang/045.phpt
new file mode 100644
index 0000000..11598cf
--- /dev/null
+++ b/tests/lang/045.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Timeout again inside register_shutdown_function
+--SKIPIF--
+<?php
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+?>
+--FILE--
+<?php
+set_time_limit(1);
+register_shutdown_function("plop");
+
+function plop() {
+ $ts = time();
+ while(true) {
+ if ((time()-$ts) > 2) {
+ echo "Failed!";
+ break;
+ }
+ }
+}
+plop();
+?>
+===DONE===
+--EXPECTF--
+Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
+
+Fatal error: Maximum execution time of 1 second exceeded in %s on line %d