|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-02 12:16 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ ReflectionProperty returns incorrect declaring class for protected properties. Reproduce code: --------------- class Parent { public $publicVar; protected $protectedVar; } class Child extends Parent { } $r = new ReflectionClass('Child'); print $r->getProperty('publicVar')->getDeclaringClass()->getName(); print $r->getProperty('protectedVar')->getDeclaringClass()->getName(); Expected result: ---------------- ParentClass ParentClass Actual result: -------------- ParentClass ChildClass