Re: underscore in php functions?
| From: | Ashley Sheridan | Date: | Mon, 03 Aug 2009 20:51:37 +0000 |
| Subject: | Re: underscore in php functions? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296243@lists.php.net to get a copy of this message | ||
On Mon, 2009-08-03 at 22:46 +0200, Oral Timocin wrote:
> Stuart wrote:
>
> > 2009/8/3 Oral Timocin <o_timocin@gmx.de>:
> >> Hi all,
> >>
> >> i am a newbie to php an want to learn it. Aftere reading some sample Code
> >> an the documetation i have an unanswered question!
> >>
> >> for example:
> >>
> >> public function _example(){
> >> }
> >>
> >> what does the _ mean in that function. Could anyone help me?
> >
> > Absolutely. But some developers use it as a convention for private
> > methods or some other indicator.
> >
> > -Stuart
> >
>
> Thank you for the answer. I have looked for the sample code again and you
> are right. Some of the marked funtions are protected and some are private.
> Now i have understand that. Thank you again.
>
> regards
>
Also, there are some special cases, like the __construct() function,
which use a double underscore, and have a special meaning for classes.
Thanks,
Ash
http://www.ashleysheridan.co.uk