blob: 502ac741a9081efb71c2eb107f8da5bb0a9843aa (
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
|