mirror of
https://github.com/php/php-src.git
synced 2026-10-29 10:22:06 +08:00
Add directories for tests relating to - `break` statements - functions with by-ref returns - `class_exists()` - dynamic properties - error handlers - error suppression with `@` - `get_object_vars()` - `highlight_string()` and `highlight_file()` - interfaces - `is_callable()` - iterators - shutdown functions - streams As well as organizing a couple of tests into existing sub directories along the way Work towards GH-15631
22 lines
453 B
PHP
22 lines
453 B
PHP
--TEST--
|
|
Bug #35017 (Exception thrown in error handler may cause unexpected behavior)
|
|
--FILE--
|
|
<?php
|
|
set_error_handler('errorHandler');
|
|
try {
|
|
if ($a) {
|
|
echo "1\n";
|
|
} else {
|
|
echo "0\n";
|
|
}
|
|
echo "?\n";
|
|
} catch(Exception $e) {
|
|
echo "This Exception should be caught\n";
|
|
}
|
|
function errorHandler($errno, $errstr, $errfile, $errline) {
|
|
throw new Exception('Some Exception');
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
This Exception should be caught
|