xref: /php-src/tests/func/005a.phpt (revision f83a23e5)
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
10echo "Start\n";
11
12function boo()
13{
14    echo "Shutdown\n";
15}
16
17register_shutdown_function("boo");
18
19set_time_limit(1);
20
21/* infinite loop to simulate long processing */
22for (;;) {}
23
24echo "End\n";
25
26?>
27--EXPECTF--
28Start
29
30Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
31Shutdown
32