#43924 [Opn]: Overloading methods can be static and non-public

From: Date: Thu, 24 Jan 2008 09:34:30 +0000
Subject: #43924 [Opn]: Overloading methods can be static and non-public
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-461@lists.php.net to get a copy of this message
ID: 43924 Updated by: felipe@php.net Reported By: felipe@php.net Status: Open -Bug Type: Scripting Engine problem +Bug Type: Documentation problem PHP Version: 5.3CVS-2008-01-23 (CVS) New Comment: "All overloading methods must not be defined as static." Ok. I mean the phrase references just concept, whereas $this isn't allowed in static methods. But, "All overloading methods must be defined as public.", really isn't true. Previous Comments: ------------------------------------------------------------------------ [2008-01-23 22:47:14] felipe@php.net Description: ------------ Says the documentation: "All overloading methods must not be defined as static. All overloading methods must be defined as public." However, this rule doesn't exists. Reproduce code: --------------- <?php class foobar { static private function __call($x, $y) { printf("[[%s]]\n", $x); } } $foo = new foobar; $foo->test(); ?> Expected result: ---------------- Some error message. Actual result: -------------- [[test]] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43924&edit=1

« previous php.doc.bugs (#461) next »