2005-11-01 03:29:48 +08:00
|
|
|
--TEST--
|
|
|
|
Bug #35017 (Exception thrown in error handler may cause unexpected behavior)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
set_error_handler('errorHandler');
|
|
|
|
try {
|
2020-02-04 05:52:20 +08:00
|
|
|
if ($a) {
|
|
|
|
echo "1\n";
|
|
|
|
} else {
|
|
|
|
echo "0\n";
|
|
|
|
}
|
|
|
|
echo "?\n";
|
2018-09-17 01:16:42 +08:00
|
|
|
} catch(Exception $e) {
|
2018-08-10 10:19:55 +08:00
|
|
|
echo "This Exception should be caught\n";
|
2005-11-01 03:29:48 +08:00
|
|
|
}
|
2019-01-30 22:54:35 +08:00
|
|
|
function errorHandler($errno, $errstr, $errfile, $errline) {
|
2020-02-04 05:52:20 +08:00
|
|
|
throw new Exception('Some Exception');
|
2005-11-01 03:29:48 +08:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
2018-08-10 10:19:55 +08:00
|
|
|
This Exception should be caught
|