Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19355 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34954 invoked by uid 1010); 3 Oct 2005 15:39:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34935 invoked from network); 3 Oct 2005 15:39:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2005 15:39:11 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.4/2.6 Received: from ([204.11.219.139:59515] helo=colo.lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 5E/B1-54476-62A41434 for ; Mon, 03 Oct 2005 11:11:34 -0400 Received: from [192.168.10.100] (c-24-6-5-134.hsd1.ca.comcast.net [24.6.5.134]) (authenticated bits=0) by colo.lerdorf.com (8.13.5/8.13.5/Debian-2) with ESMTP id j93FBTon010915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 3 Oct 2005 08:11:30 -0700 Message-ID: <43414A22.3040504@lerdorf.com> Date: Mon, 03 Oct 2005 08:11:30 -0700 User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Gutmans CC: "'PHP Developers Mailing List'" References: <002a01c5c823$97c04d20$e902a8c0@thinkpad> <6.2.3.4.2.20051003073141.0351a3d0@localhost> In-Reply-To: <6.2.3.4.2.20051003073141.0351a3d0@localhost> X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] $ref =& $this; From: rasmus@lerdorf.com (Rasmus Lerdorf) Andi Gutmans wrote: > Assigning to it will break "this" in the symbol table, or EG(This)? If > it's the latter then it is a problem (and it's the reason I didn't > support it to begin with). Given that: class foo { function bar() { $this->a = 1; $ref = &$this; $ref->b = 2; $ref = null; } } $x = new foo; $x->bar(); echo $x->a, $x->b; Outputs 12 and doesn't appear to cause any major badness internally, I don't really see any reason to disallow it. If an E_STRICT could be raised without affecting performance too much that would be good since it is a useless assignment. Given the lack of badness on the php5 side and the high level of goodness for php4 portability, I say leave it as it is now. -Rasmus