Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47632 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17394 invoked from network); 25 Mar 2010 23:49:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2010 23:49:16 -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:42824] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/E4-25388-976FBAB4 for ; Thu, 25 Mar 2010 18:49:15 -0500 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 8317643F86; Thu, 25 Mar 2010 16:50:52 -0700 (PDT) Received: from [192.168.16.93] ([192.168.16.93]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 25 Mar 2010 16:49:10 -0700 Message-ID: <4BABF675.4010006@zend.com> Date: Thu, 25 Mar 2010 16:49:09 -0700 Organization: Zend Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: "Ionut G. Stan" CC: 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> <4BA7C9CF.1000008@zend.com> <4BABF123.4050102@gmail.com> In-Reply-To: <4BABF123.4050102@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Mar 2010 23:49:10.0272 (UTC) FILETIME=[C3DC6000:01CACC75] Subject: Re: [PHP-DEV] Assign array with __get From: stas@zend.com (Stanislav Malyshev) Hi! > So, what's the reasoning behind this design decision? Why is it supposed > to work like this and not the other way around? Because when you return something by-value you can not have effects of its modification reflect on the original value. That's how by-value works. When you have by-ref return you can modify it and have the original value change. More here: http://php.net/references -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com