timeout_variation_4.phpt 435 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Timeout within call_user_func
  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. call_user_func('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