mirror of
https://github.com/php/php-src.git
synced 2026-03-28 18:22:42 +01:00
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)
|