timeout_variation_5.phpt 456 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Timeout within function containing exception
  3. --SKIPIF--
  4. <?php
  5. if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
  6. ?>
  7. --FILE--
  8. <?php
  9. include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc";
  10. set_time_limit($t);
  11. function f($t) {
  12. echo "call";
  13. busy_wait($t*2);
  14. throw new Exception("never reached here");
  15. }
  16. f($t);
  17. ?>
  18. never reached here
  19. --EXPECTF--
  20. call
  21. Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d