php-src/Zend/tests/closure_031.phpt
2015-05-16 16:49:14 -05:00

20 lines
360 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