bug33802.phpt 371 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #33802 (throw Exception in error handler causes crash)
  3. --FILE--
  4. <?php
  5. set_error_handler('errorHandler', E_USER_ERROR);
  6. try{
  7. test();
  8. }catch(Exception $e){
  9. }
  10. restore_error_handler();
  11. function test(){
  12. trigger_error("error", E_USER_ERROR);
  13. }
  14. function errorHandler($errno, $errstr, $errfile, $errline) {
  15. throw new Exception();
  16. }
  17. ?>
  18. ok
  19. --EXPECT--
  20. ok