note 77887 added to language.oop5.overloading
| From: | Typer85 at gmail dot com | Date: | Tue, 18 Sep 2007 15:28:50 +0000 |
| Subject: | note 77887 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130568@lists.php.net to get a copy of this message | ||
Just to clarify something the manual states about method overloading.
"All overloading methods must be defined as public."
As of PHP 5.2.2, this should be considered more of a coding convention rather than a requirement. In
PHP 5.2.2, declaring a __get or __set function with a visibility other than public, will be silently
ignored by the parser and will not trigger a parse error!
What is more, PHP will completely ignore the visibility modifier either of these functions are
declared with and will always treat them as if they were public.
I am not sure if this is a bug or not so to be on the safe side,
stick with always declaring them public.
----
Server IP: 69.147.83.197
Probable Submitter: 217.54.225.147
----
Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/77887
Del: integrated -- https://master.php.net/note/delete/77887/integrated
Del: useless -- https://master.php.net/note/delete/77887/useless
Del: bad code -- https://master.php.net/note/delete/77887/bad+code
Del: spam -- https://master.php.net/note/delete/77887/spam
Del: non-english -- https://master.php.net/note/delete/77887/non-english
Del: in docs -- https://master.php.net/note/delete/77887/in+docs
Del: other reasons-- https://master.php.net/note/delete/77887
Reject -- https://master.php.net/note/reject/77887
Search -- https://master.php.net/manage/user-notes.php