mirror of
https://github.com/php/php-src.git
synced 2026-10-29 02:07:35 +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
24 lines
438 B
PHP
24 lines
438 B
PHP
--TEST--
|
|
Bug #29890 (crash if error handler fails)
|
|
--FILE--
|
|
<?php
|
|
function customErrorHandler($fErrNo,$fErrStr,$fErrFile,$fErrLine) {
|
|
echo "error :".$fErrStr."\n";
|
|
}
|
|
|
|
set_time_limit(5);
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
set_error_handler("customErrorHandler");
|
|
|
|
define("TEST",2);
|
|
|
|
//should return a notice that the constant is already defined
|
|
|
|
define("TEST",3);
|
|
|
|
?>
|
|
--EXPECT--
|
|
error :Constant TEST already defined, this will be an error in PHP 9
|