summaryrefslogtreecommitdiff
path: root/tests/basic/timeout_variation_6.phpt
blob: c172625f5d7b7467222fee1247881ab7697c7485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--TEST--
Timeout within function trowing exception before timeout reached
--SKIPIF--
<?php
	if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
<?php

include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc";

set_time_limit($t);

function f($t) {
	echo "call";
	busy_wait($t-1);
	throw new Exception("exception before timeout");
}

f($t);
?>
never reached here
--EXPECTF--
call
Fatal error: Uncaught Exception: exception before timeout in %s:%d
Stack trace:
#0 %s(%d): f(%d)
#1 {main}
  thrown in %s on line %d