diff options
Diffstat (limited to 'ext/reflection/tests/bug36434.phpt')
-rw-r--r-- | ext/reflection/tests/bug36434.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug36434.phpt b/ext/reflection/tests/bug36434.phpt new file mode 100644 index 0000000000..e305c657a8 --- /dev/null +++ b/ext/reflection/tests/bug36434.phpt @@ -0,0 +1,33 @@ +--TEST-- +Reflection Bug #36434 (Properties from parent class fail to indetify their true origin) +--SKIPIF-- +<?php extension_loaded('reflection') or die('skip'); ?> +--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 |