Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44180 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62818 invoked from network); 5 Jun 2009 14:10:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2009 14:10:17 -0000 Authentication-Results: pb1.pair.com header.from=jmertic@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=jmertic@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.179 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: jmertic@gmail.com X-Host-Fingerprint: 209.85.146.179 wa-out-1112.google.com Received: from [209.85.146.179] ([209.85.146.179:15523] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/11-09243-747292A4 for ; Fri, 05 Jun 2009 10:10:16 -0400 Received: by wa-out-1112.google.com with SMTP id m16so309791waf.7 for ; Fri, 05 Jun 2009 07:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=L1nV177RDAeeEVqmy76OP8OrQp9+1GXhDHAIOgwRWAI=; b=DhrOb5HQz9Weeq61OsG4F/mwcxIBfnGzHQLhw1obGEliwJKjI5deInZiYBUwTsCuZe L+QjQ3WoMEc1sb95S/m/W8Bk/N/yosFZUUulBqf5ryXNS14GayzrqIX+oeK7GdIUh0EP tDtf0sr/3jAcRmYzNj4aFqOGDUvHSJ8CsoLbw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=Jo9VoDK+Y61P8heuwPEVpbP7UUaBXiYx9Mw72v9/AUl8BaseP48wzP6zZLaRfa8Vbz tjzGrIIMnOaxTaJPhA2yKXmZmWOhlVfL+f8YV4qrJdqmsCCagw58+YNuKUnJMGjzioAQ QETLoifzM/J1C3LDDLiCzhUoK0kORC1qTv634= Received: by 10.114.26.1 with SMTP id 1mr4509574waz.202.1244211013372; Fri, 05 Jun 2009 07:10:13 -0700 (PDT) Received: from John-Mertics-Macbook-Pro.local (cable-pool6-cs-126.doycomm.com [66.219.185.126]) by mx.google.com with ESMTPS id k21sm12694283waf.59.2009.06.05.07.10.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Jun 2009 07:10:11 -0700 (PDT) Message-ID: <4A292740.9090804@gmail.com> Date: Fri, 05 Jun 2009 07:10:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: Stan Vassilev CC: internals References: <3949706BB9424F7FAC5AC708A01119DB@pc> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000809080003050704020404" Subject: Re: [PHP-DEV] Test for edge cases with __get and property access flags From: jmertic@gmail.com (John Mertic) --------------000809080003050704020404 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Here's that test. I don't have commit rights to that area of CVS so someone will need to do it for me. John Mertic jmertic@php.net On 6/5/09 5:58 AM, Stan Vassilev wrote: > 3. When the caller tries to retrieve $object->foo, and foo is a private/protected member the caller has no access to, instead of an error, __get is called. > > I'm not very sure the current behavior on item 3 is the best one (maybe error should be thrown regardless?), but freezing on either would be better than leaving it undefined :) > > > I always thought that this is the supposed behaviour. I believe I even relied on it in one of my projects > > > Hi, > > If the community wants it like it is, then I'm just fine with that: as long as the test is committed, so that it doesn't change overnight. Any volunteers :)? > > Regards, > Stan Vassilev > --------------000809080003050704020404 Content-Type: text/plain; x-mac-type="54455854"; x-mac-creator="4A455350"; name="__set__get_006.phpt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="__set__get_006.phpt" LS1URVNULS0KVGVzdCBmb3IgX19nZXQoKSBhbmQgX19zZXQoKSBiZWluZyBhYmxlIHRvIGFj Y2VzcyBwcml2YXRlL3Byb3RlY3RlZCBtZW1iZXJzCi0tRklMRS0tCjw/cGhwCmNsYXNzIFRl c3QgewogICAgcHJvdGVjdGVkICR4OwogICAgcHJpdmF0ZSAkeTsKICAgIAogICAgZnVuY3Rp b24gX19nZXQoJG5hbWUpIHsKICAgICAgICByZXR1cm4gJHRoaXMtPiRuYW1lOwogICAgfQoJ ZnVuY3Rpb24gX19zZXQoJG5hbWUsICR2YWwpIHsKCSAgICAkdGhpcy0+JG5hbWUgPSAkdmFs OwogICAgfQp9CgokZm9vID0gbmV3IFRlc3QoKTsKJGZvby0+eCA9ICdmb28nOwokZm9vLT55 ID0gJ2Jhcic7CnZhcl9kdW1wKCRmb28tPngpOwp2YXJfZHVtcCgkZm9vLT55KTsKPz4KPT09 RE9ORT09PQotLUVYUEVDVC0tCnN0cmluZygzKSAiZm9vIgpzdHJpbmcoMykgImJhciIKPT09 RE9ORT09PQotLVVFWFBFQ1QtLQp1bmljb2RlKDMpICJmb28iCnVuaWNvZGUoMykgImJhciIK PT09RE9ORT09PQo= --------------000809080003050704020404--