bug60909_2.phpt 488 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function).
  3. --FILE--
  4. <?php
  5. register_shutdown_function(function(){echo("\n\n!!!shutdown!!!\n\n");});
  6. class Bad {
  7. public function __toString() {
  8. throw new Exception('I CAN DO THIS');
  9. }
  10. }
  11. $bad = new Bad();
  12. echo "$bad";
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Uncaught Exception: I CAN DO THIS in %s:%d
  16. Stack trace:
  17. #0 %s(%d): Bad->__toString()
  18. #1 {main}
  19. thrown in %s on line %d
  20. !!!shutdown!!!