|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-17 12:51 UTC] [email protected]
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
Description: ------------ Code below produces "private!" - meaning that object is allowed to access private methods of the parent class, which is, of course, wrong. Reproduce code: --------------- <? class foo { private function bar() { echo "private!\n"; } } class fooson extends foo { function barson() { $this->bar(); } } class foo2son extends fooson { function bar() { echo "public!\n"; } } $b = new foo2son(); $b->barson(); ?> Expected result: ---------------- public! Actual result: -------------- private!