1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
archived-php-src/ext/reflection/tests/bug36434.phpt
T
2024-10-03 07:55:25 +02:00

32 lines
533 B
PHP

--TEST--
Reflection Bug #36434 (Properties from parent class fail to identify their true origin)
--FILE--
<?php
class ancestor
{
public $ancestor = 0;
function __construct()
{
return $this->ancestor;
}
}
class foo extends ancestor
{
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
ancestor ancestor