php-src/Zend/tests/bug50146.phpt
Nikita Popov 008bfcc7ba Use NO_DYNAMIC_PROPERTIES for Closure
Instead of manually implementing this, use the standard mechanism.
This has minor behavior changes (e.g. doing an isset() will now
return false instead of throwing) which are more in line with
typical behavior.
2021-05-14 14:48:56 +02:00

20 lines
302 B
PHP

--TEST--
Bug #50146 (property_exists: Closure object cannot have properties)
--FILE--
<?php
$obj = function(){};
var_dump(property_exists($obj,'foo'));
$ref = new ReflectionObject($obj);
var_dump($ref->hasProperty('b'));
var_dump(isset($obj->a));
?>
--EXPECT--
bool(false)
bool(false)
bool(false)