Re: __functions
| From: | Firman Wandayandi | Date: | Thu, 03 Mar 2005 06:22:33 +0000 |
| Subject: | Re: __functions | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17803@lists.php.net to get a copy of this message | ||
On Thu, 3 Mar 2005 13:55:26 +1000, Rob Agar <rob@wildlime.com> wrote:
> hiya
>
> just a quick 'un about function naming - the naming convention says
> that functions that begin with an underscore are to be considered as
> private to the class. What's the significance of beginning with two
> underscores? Is it supposed to differentiate between private &
> protected in c++ speak?
All of that are only naming convention for easy to debugging purpose.
Two underscores already taken by PHP5 built-in class method e.g
__construct(), __toString(), __call(). So all PEAR developers agree
that protected class members are not has a prefix, e.g foo() same as
with public class members. For more detail take look at a proposal
http://pear.php.net/pepr/pepr-proposal-show.php?id=99
--
Firman Wandayandi .:: OrangEnigmA : Never Dreamt Before ::.