summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug36434.phpt
blob: 9598a40b7b1b29459382f5f5ad240edce54b59b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Reflection Bug #36434 (Properties from parent class fail to indetify their true origin)
--FILE--
<?php
class ancester
{
    public $ancester = 0;
	function __construct()
	{
		return $this->ancester;
	}
}
class foo extends ancester
{
    public $bar = "1";
	function __construct()
	{
		return $this->bar;
	}
}

$r = new ReflectionClass('foo');
foreach ($r->GetProperties() as $p)
{
	echo $p->getName(). " ". $p->getDeclaringClass()->getName()."\n";
}

?>
--EXPECT--	
bar foo
ancester ancester