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

From: Date: Sat, 09 Feb 2008 01:04:58 +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-505@lists.php.net to get a copy of this message
ID: 43924 Updated by: stas@php.net Reported By: felipe@php.net Status: Open Bug Type: Documentation problem PHP Version: 5.3CVS-2008-01-23 (CVS) New Comment: It looks like right now the engine just ignores qualifiers on such methods. I.e. __call you defined in fact won't be static or private. Previous Comments: ------------------------------------------------------------------------ [2008-01-24 09:34:30] felipe@php.net "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. ------------------------------------------------------------------------ [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 (#505) next »