xref: /PHP-7.2/Zend/tests/bug50146.phpt (revision e97d5fab)
1--TEST--
2Bug #50146 (property_exists: Closure object cannot have properties)
3--FILE--
4<?php
5
6$obj = function(){};
7
8var_dump(property_exists($obj,'foo'));
9
10$ref = new ReflectionObject($obj);
11var_dump($ref->hasProperty('b'));
12
13var_dump(isset($obj->a));
14
15?>
16--EXPECTF--
17bool(false)
18bool(false)
19
20Fatal error: Uncaught Error: Closure object cannot have properties in %s:%d
21Stack trace:
22#0 {main}
23  thrown in %s on line %d
24