1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/tests/basic/timeout_variation_6.phpt
2018-10-14 19:45:12 +02:00

30 lines
540 B
PHP

--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