Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36564 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54771 invoked from network); 26 Mar 2008 20:07:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Mar 2008 20:07:22 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:16445] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/4B-47041-8FCAAE74 for ; Wed, 26 Mar 2008 15:07:21 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 Mar 2008 22:07:48 +0200 Received: from [192.168.16.84] ([192.168.16.84]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 Mar 2008 13:07:45 -0700 Message-ID: <47EAACF2.8050603@zend.com> Date: Wed, 26 Mar 2008 13:07:14 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: Felipe Pena , Lars Strojny , Robin Fernandes , internals References: <5a8807d10802050343r43742844we89366ec47b57f4b@mail.gmail.com> <46ccd1ab0803241816k413c7605p2c3fb9139afd8536@mail.gmail.com> <5a8807d10803250404o6fd33662wbbf3ff14d296cb2a@mail.gmail.com> <1206444907.11368.4.camel@localhost> <1206445347.5400.1.camel@felipe> <10845a340803260945u7a49d991uac5d39be13cca988@mail.gmail.com> <10845a340803260956g6166feaboc04e55c88a9a1a8c@mail.gmail.com> In-Reply-To: <10845a340803260956g6166feaboc04e55c88a9a1a8c@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 26 Mar 2008 20:07:45.0001 (UTC) FILETIME=[0E152590:01C88F7D] Subject: Re: [PHP-DEV] Inconsistencies when accessing protected members From: stas@zend.com (Stanislav Malyshev) > It just doesn't seem right to be able to call a private or protected > method of another instance. Sort of isn't private any more. Why not? Private/protected is meant to separate APIs, it's not a security check on objects. Private means this API belongs to this class only, protected means this API belongs to this class and the children - i.e. to whoever develops this class further, but not to the clients. However, I see no reason to restrict class's code access to its own functions because the passed object is not $this. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com