1--TEST-- 2Timeout within function trowing exception before timeout reached 3--SKIPIF-- 4<?php 5 if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); 6?> 7--FILE-- 8<?php 9 10include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; 11 12set_time_limit($t); 13 14function f($t) { 15 echo "call"; 16 busy_wait($t-1); 17 throw new Exception("exception before timeout"); 18} 19 20f($t); 21?> 22never reached here 23--EXPECTF-- 24call 25Fatal error: Uncaught Exception: exception before timeout in %s:%d 26Stack trace: 27#0 %s(%d): f(%d) 28#1 {main} 29 thrown in %s on line %d 30