Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60351 invoked by uid 1010); 30 Nov 2007 12:06:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 60336 invoked from network); 30 Nov 2007 12:06:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2007 12:06:31 -0000 Authentication-Results: pb1.pair.com header.from=johannes@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 83.243.58.163 as permitted sender) X-PHP-List-Original-Sender: johannes@php.net X-Host-Fingerprint: 83.243.58.163 mail4.netbeat.de Received: from [83.243.58.163] ([83.243.58.163:42784] helo=mail4.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/55-16948-6CCFF474 for ; Fri, 30 Nov 2007 07:06:31 -0500 Received: (qmail 24648 invoked by uid 507); 30 Nov 2007 12:06:25 -0000 Received: from unknown (HELO ?192.168.1.102?) (postmaster%schlueters.de@82.135.82.139) by mail4.netbeat.de with ESMTPA; 30 Nov 2007 12:06:25 -0000 To: "\"Marco Kaiser\"" Cc: internals@lists.php.net In-Reply-To: <474ff865.0d135e0a.4536.ffffa229@mx.google.com> References: <474ff865.0d135e0a.4536.ffffa229@mx.google.com> Content-Type: text/plain Date: Fri, 30 Nov 2007 13:06:20 +0100 Message-ID: <1196424380.1563.2.camel@johannes.nop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 (2.12.1-3.fc8) Content-Transfer-Encoding: 7bit Subject: Re: private properties .... From: johannes@php.net (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi Marco, On Fri, 2007-11-30 at 12:43 +0100, "Marco Kaiser" wrote: > Conclusion: > 1. Why i can access a private property from a different class instance > (name) but same type ? > $aa and $bb are instances of aaa but not the same. Since PHP's object model is based n the class concept and these limitations are bound to the class, not the object. > 2. This doesnt works if cc is a own class with same property name (ie. > interface or something like this) cc is another class. > 3. Is it a bug that i can't use same property name in my child class? > (normaly the parent property isnt visible to the child) > cc extends aaa. That's a feature: Extended classes know nothing about private stuff in the parent class. Without that the encapsulation won't be complete. > Thats just some questions :) And some answers. johannes