Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19339 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52992 invoked by uid 1010); 3 Oct 2005 13:39:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52977 invoked from network); 3 Oct 2005 13:39:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2005 13:39:05 -0000 X-Host-Fingerprint: 195.226.9.186 unknown Received: from ([195.226.9.186:18039] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id AD/F7-54476-77431434 for ; Mon, 03 Oct 2005 09:39:03 -0400 To: internals@lists.php.net,Derick Rethans Message-ID: <43413474.90802@cschneid.com> Date: Mon, 03 Oct 2005 15:39:00 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 195.226.9.186 Subject: Re: $ref =& $this; From: cschneid@cschneid.com (Christian Schneider) Derick Rethans wrote: > pointless - I would even go as far as disallowing passing $this by > references to a function - where the reference has to be ignored again, This would be needed to have something like function setfoo(&$obj) { $obj->foo = 42; } [...] $other->setfoo($this); in a way which also works for PHP4. a) I know that you now are going to bash me for mentioning PHP4 b) No, I don't think this is very common or elegant But disallowing it might break existing code, no? - Chris