Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47470 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18138 invoked from network); 22 Mar 2010 19:49:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2010 19:49:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Received: from [63.205.162.117] ([63.205.162.117:45051] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/46-15234-5D9C7AB4 for ; Mon, 22 Mar 2010 14:49:44 -0500 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 4562243F56 for ; Mon, 22 Mar 2010 12:50:28 -0700 (PDT) Received: from [192.168.16.93] ([192.168.16.93]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 22 Mar 2010 12:49:36 -0700 Message-ID: <4BA7C9CF.1000008@zend.com> Date: Mon, 22 Mar 2010 12:49:35 -0700 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: internals@lists.php.net References: <4BA0DF61.1010907@easyflirt.com> <4BA0E39C.7020600@gmail.com> <4BA0E9E8.8000404@easyflirt.com> <4BA1DB19.1080608@easyflirt.com> <660eb66f1003180224g5662ba1dtb123c3ee88a3a3e5@mail.gmail.com> <4BA25919.8090805@easyflirt.com> <4BA37E11.9080403@gmail.com> In-Reply-To: <4BA37E11.9080403@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Mar 2010 19:49:36.0793 (UTC) FILETIME=[CD5C4890:01CAC9F8] Subject: Re: [PHP-DEV] Assign array with __get From: stas@zend.com (Stanislav Malyshev) Hi! > I guess what Mathieu is trying to say is that this: > ...is inconsistent with this: This is because you're doing it wrong. If you intend to modify the property, return it by-ref. Saying the magic "consistency" word doesn't change that. > Now, I'm not really sure this is that bad, as there may be use cases > where one would like to return different values every time __get is > called. And, as I wrote in a previous email, there are ways to work > around this inconsistency by using return by reference, so everybody can > be happy. I think. It's not "the way around this inconsistency" - it's how it is supposed to work. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com