summaryrefslogtreecommitdiff
path: root/Zend/tests/closure_031.phpt
blob: 042bf8c1457b119dc2d3b9214c8f1d03a480b9e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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