xref: /PHP-5.3/ext/reflection/tests/020.phpt (revision 610c7fbe)
1--TEST--
2ReflectionObject::hasProperty
3--SKIPIF--
4<?php extension_loaded('reflection') or die('skip'); ?>
5--FILE--
6<?php
7class 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());
18var_dump($obj->hasProperty("p1"));
19var_dump($obj->hasProperty("p2"));
20var_dump($obj->hasProperty("p3"));
21var_dump($obj->hasProperty("p4"));
22?>
23--EXPECT--
24bool(true)
25bool(true)
26bool(true)
27bool(false)
28