Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47631 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14632 invoked from network); 25 Mar 2010 23:25:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2010 23:25:57 -0000 Authentication-Results: pb1.pair.com header.from=ionut.g.stan@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ionut.g.stan@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.216 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ionut.g.stan@gmail.com X-Host-Fingerprint: 209.85.218.216 mail-bw0-f216.google.com Received: from [209.85.218.216] ([209.85.218.216:48509] helo=mail-bw0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/74-25388-301FBAB4 for ; Thu, 25 Mar 2010 18:25:56 -0500 Received: by bwz8 with SMTP id 8so2620087bwz.23 for ; Thu, 25 Mar 2010 16:25:53 -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:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=7rgzZSMo1aVc7MUS4YSQWULDbe45uUSqnX79DSJx0P0=; b=l/5TB7hs3bT1pfsdcQyyEeLzxTSljOHOLGLeFonMetrXNB3nOSeIgjfJ+InCAJgsiO feE8XPRKsI7Rzys9NBIygsbEOtp9/4Ay9V/wdz2sucfjNU8YNyWhTxwf5hxAiBGAmlKS GoqePfn5dZZLLLEJEVwykfqRTrfbHMYJ+60Ao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; b=Kas3S9rh04XkuYwKeUWptIdyeqmkhj9+QjqoSZ1fZ575scPFItcm3+s9F+Bra04jlZ yFf4ptXCU074uYl3vdRLqkFnYnOd0FY+67kEk4VVO0fO5cfHWHArLomjL0F3CF24/Ua/ oP4Fga8xS2EWZG5xwM9eRUNsNW3GdoaXwtGKc= Received: by 10.204.130.90 with SMTP id r26mr518821bks.9.1269559553056; Thu, 25 Mar 2010 16:25:53 -0700 (PDT) Received: from [89.36.11.207] ([89.36.11.207]) by mx.google.com with ESMTPS id 15sm216069bwz.12.2010.03.25.16.25.51 (version=SSLv3 cipher=RC4-MD5); Thu, 25 Mar 2010 16:25:51 -0700 (PDT) Message-ID: <4BABF123.4050102@gmail.com> Date: Fri, 26 Mar 2010 01:26:27 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 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> In-Reply-To: <4BA7C9CF.1000008@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Assign array with __get From: ionut.g.stan@gmail.com ("Ionut G. Stan") Hi, On 3/22/2010 21:49, Stanislav Malyshev wrote: > 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. So, what's the reasoning behind this design decision? Why is it supposed to work like this and not the other way around? -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/