005a.phpt 461 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Testing register_shutdown_function() with timeout. (Bug: #21513)
  3. --SKIPIF--
  4. <?php
  5. if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
  6. ?>
  7. --FILE--
  8. <?php
  9. echo "Start\n";
  10. function boo()
  11. {
  12. echo "Shutdown\n";
  13. }
  14. register_shutdown_function("boo");
  15. set_time_limit(1);
  16. /* infinite loop to simulate long processing */
  17. for (;;) {}
  18. echo "End\n";
  19. ?>
  20. --EXPECTF--
  21. Start
  22. Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
  23. Shutdown