summaryrefslogtreecommitdiff
path: root/tests/basic/timeout_variation_6.phpt
blob: d3d843ca8659de553406a98392d1b47e4027d28b (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 exteption 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