mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
008bfcc7ba
Instead of manually implementing this, use the standard mechanism. This has minor behavior changes (e.g. doing an isset() will now return false instead of throwing) which are more in line with typical behavior.
20 lines
371 B
PHP
20 lines
371 B
PHP
--TEST--
|
|
Closure 031: Closure properties with custom error handlers
|
|
--FILE--
|
|
<?php
|
|
function foo($errno, $errstr, $errfile, $errline) {
|
|
echo "Warning: $errstr\n";
|
|
}
|
|
set_error_handler('foo');
|
|
$foo = function() {
|
|
};
|
|
try {
|
|
var_dump($foo->a);
|
|
} catch (Error $ex) {
|
|
echo "Error: {$ex->getMessage()}\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Warning: Undefined property: Closure::$a
|
|
NULL
|