mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
008bfcc7ba
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.
20 lines
302 B
PHP
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)
|