bug60738.phpt 347 B

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