xref: /PHP-7.2/Zend/tests/closure_031.phpt (revision f1d7e3ca)
1--TEST--
2Closure 031: Closure properties with custom error handlers
3--FILE--
4<?php
5function foo($errno, $errstr, $errfile, $errline) {
6	echo "Error: $errstr\n";
7}
8set_error_handler('foo');
9$foo = function() {
10};
11try {
12	var_dump($foo->a);
13} catch (Error $ex) {
14	echo "Error: {$ex->getMessage()}\n";
15}
16?>
17--EXPECT--
18Error: Closure object cannot have properties
19