xref: /PHP-5.3/tests/lang/045.phpt (revision b38d5661)
1--TEST--
2Timeout again inside register_shutdown_function
3--SKIPIF--
4<?php
5if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6?>
7--FILE--
8<?php
9set_time_limit(1);
10register_shutdown_function("plop");
11
12function plop() {
13    $ts = time();
14    while(true) {
15        if ((time()-$ts) > 2) {
16            echo "Failed!";
17            break;
18        }
19    }
20}
21plop();
22?>
23===DONE===
24--EXPECTF--
25Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
26
27Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
28