Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43031 invoked from network); 6 Mar 2008 22:51:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2008 22:51:51 -0000 X-Host-Fingerprint: 24.228.80.153 ool-18e45099.dyn.optonline.net Received: from [24.228.80.153] ([24.228.80.153:17963] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/52-32159-68570D74 for ; Thu, 06 Mar 2008 17:51:51 -0500 Message-ID: <6A.52.32159.68570D74@pb1.pair.com> To: internals@lists.php.net Date: Thu, 06 Mar 2008 17:51:47 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.6.0.104 MIME-Version: 1.0 References: <7d5a202f0803061338jcd4fae3pecd559728443386d@mail.gmail.com> In-Reply-To: <7d5a202f0803061338jcd4fae3pecd559728443386d@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Posted-By: 24.228.80.153 Subject: Re: having fun with $this From: edwardzyang@thewritingpot.com ("Edward Z. Yang") Cristian Rodriguez wrote: > In all those cases, I expect a fatal error : cannot re-asign $this. > right ? or Im missing something ? These examples don't cause any problems because they're not in the object context, so $this is just another, ordinary variable. If you include'd the files inside something like: class Foo { public function bar() { include 'this-test.php'; } } there should be an error -- Edward Z. Yang GnuPG: 0x869C48DA HTML Purifier Anti-XSS Filter [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]