]> granicus.if.org Git - php/commitdiff
Added test for bug #36434
authorIlia Alshanetsky <iliaa@php.net>
Wed, 22 Feb 2006 15:45:25 +0000 (15:45 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 22 Feb 2006 15:45:25 +0000 (15:45 +0000)
ext/reflection/tests/bug36434.phpt [new file with mode: 0644]

diff --git a/ext/reflection/tests/bug36434.phpt b/ext/reflection/tests/bug36434.phpt
new file mode 100644 (file)
index 0000000..c92c358
--- /dev/null
@@ -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