|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-23 14:47 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 14 10:00:01 2026 UTC |
Description: ------------ I saw bug reports about self similar to this bug but i don't really know if both are related so I decided to post it, sorry if it is the same bug. I tested for this bug on 5.0.4 and on latest 5.1 snapshot and it is still there, if the "func" methods are not private or if they are protected it works as expected and the result is "B::func()" but if they are private the result is not what is expected. Reproduce code: --------------- class A{ private function func(){ echo "A::func()\n"; } function test(){ $this->func(); } } class B extends A{ private function func(){ echo "B::func()\n"; } } $v= new B(); $v->test(); Expected result: ---------------- B::func() Actual result: -------------- A::func()