bug60738_variation.phpt 394 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #60738 Allow 'set_error_handler' to handle NULL
  3. --FILE--
  4. <?php
  5. var_dump(set_exception_handler(
  6. function() { echo 'Intercepted exception!', "\n"; }
  7. ));
  8. var_dump(set_exception_handler(null));
  9. throw new Exception('Exception!');
  10. ?>
  11. --EXPECTF--
  12. NULL
  13. object(Closure)#1 (0) {
  14. }
  15. Fatal error: Uncaught Exception: Exception! in %s:%d
  16. Stack trace:
  17. #0 {main}
  18. thrown in %s on line %d