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