Re: Re: Weird behaviour of private attribute + overloaded method

From: Date: Tue, 15 Jun 2004 14:38:16 +0000
Subject: Re: Re: Weird behaviour of private attribute + overloaded method
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-10470@lists.php.net to get a copy of this message
On Tue, 15 Jun 2004 16:32:55 +0200 Johannes Schlueter <schlueter@phpbar.de> wrote: > Hi, > > that's imho expected behaviour. To quote > http://www.php.net/zend-engine-2.php > | Protected member variables can be accessed in classes extending the > | class they are declared in, whereas private member variables can > | only be accessed by the class they belong to. > > And $id belongs to the base class and not to the extended. What else > should be the difference between private and protected? I just was baffled by the fact, that without setId() in the extended class it works fine. But now I got it, thanks. And sorry for the noise. --- WBR, Antony Dovgal aka tony2001 tony2001@phpclub.net || antony@dovgal.com

« previous php.internals (#10470) next »