timeout_variation_2.phpt 473 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Timeout within array_walk
  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 cb(&$i, $k, $p)
  12. {
  13. busy_wait(1);
  14. }
  15. $a = array(1 => 1, 2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1);
  16. array_walk($a, "cb", "junk");
  17. ?>
  18. never reached here
  19. --EXPECTF--
  20. Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d