bug46196.phpt 705 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Test restore_error_handler() function : bug #46196
  3. --CREDITS--
  4. Olivier Doucet
  5. --FILE--
  6. <?php
  7. /* Prototype : void restore_error_handler(void)
  8. * Description: Restores the previously defined error handler function
  9. * Source code: Zend/zend_builtin_functions.c
  10. * Alias to functions:
  11. */
  12. echo "*** Testing restore_error_handler() : error bug #46196 ***\n";
  13. var_dump( set_error_handler( 'myErrorHandler' ) );
  14. var_dump( restore_error_handler() );
  15. var_dump( set_error_handler( 'myErrorHandler' ) );
  16. function myErrorHandler($errno, $errstr, $errfile, $errline)
  17. {
  18. return true;
  19. }
  20. ?>
  21. ===DONE===
  22. --EXPECT--
  23. *** Testing restore_error_handler() : error bug #46196 ***
  24. NULL
  25. bool(true)
  26. NULL
  27. ===DONE===