Andi,
> However, if you inherit from this class the new class does not know any of > the parents' private members and therefore doesn't error out. This is the > correct way of handling it because private members should be hidden to > inheriting classes.
When you say "hidden", do you mean that it still exists? That is, in the code
example there's a private $Name for the dog class, and I set a new $Name in
the code. Would that mean there was a private $Name and a public $Name? If
so, I imagine that all functions that had access to the private $Name would
use it, and all functions that didn't have access would use the public $Name.
Sounds kinda confusing! Is this correct?
Yeah that's correct. The private needs to *stick* around because the class where it is defined needs to have access to it.
Andi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php