mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Added test for bug #36434
This commit is contained in:
parent
7409ed6403
commit
07e7092729
31
ext/reflection/tests/bug36434.phpt
Normal file
31
ext/reflection/tests/bug36434.phpt
Normal file
@ -0,0 +1,31 @@
|
||||
--TEST--
|
||||
Bug #36434 (Properties from parent class fail to indetify their true origin)
|
||||
--FILE--
|
||||
<?php
|
||||
class ancester
|
||||
{
|
||||
public $ancester = 0;
|
||||
function ancester()
|
||||
{
|
||||
return $this->ancester;
|
||||
}
|
||||
}
|
||||
class foo extends ancester
|
||||
{
|
||||
public $bar = "1";
|
||||
function foo()
|
||||
{
|
||||
return $this->bar;
|
||||
}
|
||||
}
|
||||
|
||||
$r = new ReflectionClass('foo');
|
||||
foreach ($r->GetProperties() as $p)
|
||||
{
|
||||
echo $p->getName(). " ". $p->getDeclaringClass()->getName()."\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bar foo
|
||||
ancester ancester
|
Loading…
Reference in New Issue
Block a user