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
20 lines
428 B
PHP
20 lines
428 B
PHP
--TEST--
|
|
Bug #30998 (Crash when user error handler returns false)
|
|
--FILE--
|
|
<?php
|
|
error_reporting(-1);
|
|
|
|
function my_error($errno, $errstr, $errfile, $errline)
|
|
{
|
|
print "$errstr ($errno) in $errfile:$errline\n";
|
|
return false;
|
|
}
|
|
set_error_handler('my_error');
|
|
|
|
$f = fopen("/tmp/blah", "r");
|
|
?>
|
|
--EXPECTF--
|
|
fopen(): Failed to open stream: %s (2) in %s:%d
|
|
|
|
Warning: fopen(): Failed to open stream: %s in %s on line %d
|