|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-16 06:28 UTC] sniper@php.net
[2004-01-16 07:50 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 16:00:02 2025 UTC |
Description: ------------ Private class methods can be called by instantiating an object of this class in an static method. Reproduce code: --------------- <?php class t { private function dont() { echo "intended?\n"; } static function main() { $t = new t(); $t->dont(); } } t::main(); ?> Expected result: ---------------- Fatal error: Call to private method t::dont() ... Actual result: -------------- intended?