cvs: php-src /ext/reflection/tests bug36434.phpt

From: Date: Wed, 22 Feb 2006 15:45:45 +0000
Subject: cvs: php-src /ext/reflection/tests bug36434.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36992@lists.php.net to get a copy of this message
iliaa Wed Feb 22 15:45:45 2006 UTC Modified files: /php-src/ext/reflection/tests bug36434.phpt Log: MFB51: Added test for bug #36434 http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/tests/bug36434.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/reflection/tests/bug36434.phpt diff -u /dev/null php-src/ext/reflection/tests/bug36434.phpt:1.2 --- /dev/null Wed Feb 22 15:45:45 2006 +++ php-src/ext/reflection/tests/bug36434.phpt Wed Feb 22 15:45:45 2006 @@ -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

« previous php.cvs (#36992) next »