|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-01 03:09 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Description: ------------ ReflectionProperty returns incorrect declaring class in PHP > 5.1.6 Reproduce code: --------------- <?php class A { private $foo; } class B extends A { } class C extends B { public $foo; } $rc = new ReflectionClass('C'); $rp = $rc->getProperty('foo'); echo $rp->getDeclaringClass()->getName(); Expected result: ---------------- C Actual result: -------------- B