xref: /PHP-7.1/tests/func/005a.phpt (revision 7af945e2)
1--TEST--
2Testing register_shutdown_function() with timeout. (Bug: #21513)
3--SKIPIF--
4<?php
5if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6?>
7--FILE--
8<?php
9
10ini_set('display_errors', 0);
11
12echo "Start\n";
13
14function boo()
15{
16	echo "Shutdown\n";
17}
18
19register_shutdown_function("boo");
20
21/* not necessary, just to show the error sooner */
22set_time_limit(1);
23
24/* infinite loop to simulate long processing */
25for (;;) {}
26
27echo "End\n";
28
29?>
30--EXPECT--
31Start
32Shutdown
33