timeout_variation_3.phpt 415 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Timeout within eval
  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 hello ($t) {
  12. echo "call", PHP_EOL;
  13. busy_wait($t*2);
  14. }
  15. eval('hello($t);');
  16. ?>
  17. never reached here
  18. --EXPECTF--
  19. call
  20. Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d