Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36658 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1463 invoked from network); 28 Mar 2008 17:27:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2008 17:27:27 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 64.233.170.184 as permitted sender) X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.170.184 rn-out-0910.google.com Received: from [64.233.170.184] ([64.233.170.184:12517] helo=rn-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/73-25926-D7A2DE74 for ; Fri, 28 Mar 2008 12:27:27 -0500 Received: by rn-out-0910.google.com with SMTP id s46so253498rnb.3 for ; Fri, 28 Mar 2008 10:27:25 -0700 (PDT) Received: by 10.114.180.1 with SMTP id c1mr4190809waf.121.1206725244540; Fri, 28 Mar 2008 10:27:24 -0700 (PDT) Received: by 10.114.209.15 with HTTP; Fri, 28 Mar 2008 10:27:24 -0700 (PDT) Message-ID: <10845a340803281027t28a479afoca2ce7968c3329d3@mail.gmail.com> Date: Fri, 28 Mar 2008 17:27:24 +0000 Reply-To: RQuadling@GoogleMail.com To: Lokrain Cc: ceo@l-i-e.com, "Felipe Pena" , "Robin Fernandes" , internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [PHP-DEV] Richard's lack of understanding of instances vs classes. From: rquadling@googlemail.com ("Richard Quadling") On 27/03/2008, Lokrain wrote: > Hello Internals, > > This discussion was very interesting to me so I made some research about all > languages OOP. > Each time I saw definition of public, protected, private there was an > explanation which never > mentioned instances, but classes. I certainly thought that Richard is right > saying: > > > Surely it shouldn't work at all unless the $foo === $this? > > > > I was even amazed that I haven't thought about this ever...and the > conclusion of my research > is that as, like Stanislav said, this keywords(public, etc) are for classes > not for instances... > > I learned something new today :) Thanks for this discussion. > > Best Regards, Dimitar Isusov > My confusion was that I assumed public/protected/private related to instances and not classes. Whilst I accept that this is the way it is, it doesn't FEEL right that one instance of class foo can call a protected member of class bar because class bar extended class foo along the way. If they were static calls, that SORT of makes more sense to me. I suppose this lack of understanding comes from only being self-taught. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"