Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52919 invoked from network); 22 Jan 2013 11:10:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2013 11:10:15 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rquadling@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.173 as permitted sender) X-PHP-List-Original-Sender: rquadling@gmail.com X-Host-Fingerprint: 209.85.210.173 mail-ia0-f173.google.com Received: from [209.85.210.173] ([209.85.210.173:63448] helo=mail-ia0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/33-28294-6937EF05 for ; Tue, 22 Jan 2013 06:10:14 -0500 Received: by mail-ia0-f173.google.com with SMTP id l29so3195725iag.18 for ; Tue, 22 Jan 2013 03:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:reply-to:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=BH+6XOuo37doLql3HsGGeZLSU8xEOkVdK7YyABxL3no=; b=t5Jm8iYaFlcUqbTeYaoRi8VygLJ8ypsKbxmLxA/K3c/Jv2t+xVWtikgyAvP1Rh8O60 ZVimAbPYf/S0osQi3Ckv12WUnHqkwjKG+N+PWAC3tSA9gZl0kusIUc7xtlOjnVj4rm46 LUAnqCbfpaFFHdxYKiFJOhI9b+qJZNudWwWruQ+o5Gj6L8o2SmK4I/Cp3jBzeMG/hwvz cA6+6cUMDhYYTto1cQo7pBMKlVSaz1OWcL4MKgyNi8jsQouSCoAbwpfJNfaUyzix1YYd 1PsBODhKrfsNPxbgHU3NQ+nqLGAz2wDXu8CqWDqOzeU6c98RxHq9JYW6VOORLyRInh7f pZAA== X-Received: by 10.50.197.169 with SMTP id iv9mr11107558igc.32.1358853011505; Tue, 22 Jan 2013 03:10:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.159.7 with HTTP; Tue, 22 Jan 2013 03:09:51 -0800 (PST) Reply-To: RQuadling@GMail.com In-Reply-To: <50FDE67C.9060804@zerocue.com> References: <50FDE67C.9060804@zerocue.com> Date: Tue, 22 Jan 2013 11:09:51 +0000 Message-ID: To: Clint Priest Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] References in rfc:propertygetsetsyntax From: rquadling@gmail.com (Richard Quadling) On 22 January 2013 01:08, Clint Priest wrote: > On 1/21/2013 12:36 PM, Richard Quadling wrote: > > Hello. > > This may have already been covered, so apologies ... > > With https://wiki.php.net/rfc/propertygetsetsyntax-v1.2#references, > the return by reference is handled by the use of &get{}. > > How about pass-by-reference for set{}? > > It works, it was simply not included in that section, which it now is: > > Documented in the references section: > > https://wiki.php.net/rfc/propertygetsetsyntax-v1.2?&#references > > Normally, a function definition dictates this. > > But if $value is already passed, a reference to it (&$value) is not > going to be referencing the external variable surely? > > Whilst objects are always passed by reference (I assume this is still > the case for this rfc and I can see no reason why it isn't), and I > think I can see the sort of issues that setting an accessor to a > reference (binding the value of a property in this class to something > external to the class - yeah - just eek!), is this an issue? > > Will users _want_ ... > > set(&$value){ $this->externally_linked_var = $value; } > > > I'm not expecting any changes to anything, just looking for clarification. > > Regards, > > Richard. > > > -- > -Clint Brilliant. Thank you. -- Richard Quadling Twitter : @RQuadling EE : http://e-e.com/M_248814.html Zend : http://bit.ly/9O8vFY