xref: /PHP-8.2/Zend/tests/closure_031.phpt (revision 008bfcc7)
1--TEST--
2Closure 031: Closure properties with custom error handlers
3--FILE--
4<?php
5function foo($errno, $errstr, $errfile, $errline) {
6    echo "Warning: $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--
18Warning: Undefined property: Closure::$a
19NULL
20