Annotation of embedaddon/php/ext/reflection/tests/020.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ReflectionObject::hasProperty
3: --SKIPIF--
4: <?php extension_loaded('reflection') or die('skip'); ?>
5: --FILE--
6: <?php
7: class Foo {
8: public $p1;
9: protected $p2;
10: private $p3;
11:
12: function __isset($name) {
13: var_dump($name);
14: return false;
15: }
16: }
17: $obj = new ReflectionObject(new Foo());
18: var_dump($obj->hasProperty("p1"));
19: var_dump($obj->hasProperty("p2"));
20: var_dump($obj->hasProperty("p3"));
21: var_dump($obj->hasProperty("p4"));
22: ?>
23: --EXPECT--
24: bool(true)
25: bool(true)
26: bool(true)
27: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>