Hmmm,
Original: $_this->foo = "bar";
I think that it must be:
$this->_foo = "bar";
Have fun.
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Nick Winfield" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 4:49 PM
Subject: Re: [PHP] public and private parts in classes ?
> On Tue, 25 Sep 2001, Andrey Hristov wrote:
>
> > > I'm sorry, if this is a faq. But I would like to know, if there exist
> > > public and private parts in classes like in c++ ?
> > >
> > > AFAIK there are no public and private parts supportet.
> > >
> > > I would be pleased to get either a confirmation on that or, if it works,
> > > some information on how to do it.
> > >
>
> > PHP Classes are not so powerful as C++. No there is no division ot
> > private and public or protected. All is public but good technique
> > is to name methods you prefer to be private with a underbar at the start.
>
> The same applies to properties:
>
> class Test {
>
> function Test() {
> $_this->foo = "bar";
> }
>
> }
>
> $n = new Test;
> echo "foo: " . $n->foo;
> // returns 'foo: '
>
> Cheers,
>
> Nick W..
> -[ [EMAIL PROTECTED] ]-
>
> :: today's word is..
>
> haggis (n): a small, hairy creature that has 8 long legs, looks like a set
> of bagpipes and tastes good with deep-fried chipped potatoes
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]