1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00
Files
archived-php-src/Zend/tests/closure_031.phpt
2020-02-03 22:52:20 +01:00

19 lines
368 B
PHP

--TEST--
Closure 031: Closure properties with custom error handlers
--FILE--
<?php
function foo($errno, $errstr, $errfile, $errline) {
echo "Error: $errstr\n";
}
set_error_handler('foo');
$foo = function() {
};
try {
var_dump($foo->a);
} catch (Error $ex) {
echo "Error: {$ex->getMessage()}\n";
}
?>
--EXPECT--
Error: Closure object cannot have properties