mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_passing_e_user_error_to_trigger_error
23 lines
378 B
PHP
23 lines
378 B
PHP
--TEST--
|
|
Bug #33802 (throw Exception in error handler causes crash)
|
|
--FILE--
|
|
<?php
|
|
set_error_handler('errorHandler', E_USER_WARNING);
|
|
try {
|
|
test();
|
|
} catch(Exception $e){
|
|
}
|
|
restore_error_handler();
|
|
|
|
function test() {
|
|
trigger_error("error", E_USER_WARNING);
|
|
}
|
|
|
|
function errorHandler($errno, $errstr, $errfile, $errline) {
|
|
throw new Exception();
|
|
}
|
|
?>
|
|
ok
|
|
--EXPECT--
|
|
ok
|