1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
2020-02-03 22:52:20 +01:00

26 lines
448 B
PHP

--TEST--
ReflectionObject::hasProperty
--FILE--
<?php
class Foo {
public $p1;
protected $p2;
private $p3;
function __isset($name) {
var_dump($name);
return false;
}
}
$obj = new ReflectionObject(new Foo());
var_dump($obj->hasProperty("p1"));
var_dump($obj->hasProperty("p2"));
var_dump($obj->hasProperty("p3"));
var_dump($obj->hasProperty("p4"));
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(false)