Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15262 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25054 invoked by uid 1010); 6 Mar 2005 01:46:41 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 25026 invoked from network); 6 Mar 2005 01:46:40 -0000 Received: from unknown (HELO dtlink.com) (127.0.0.1) by localhost with SMTP; 6 Mar 2005 01:46:40 -0000 X-Host-Fingerprint: 207.192.181.155 master.nbinteractive.com Linux 2.4/2.6 Received: from ([207.192.181.155:43765] helo=master.nbinteractive.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id 95/35-29225-0016A224 for ; Sat, 05 Mar 2005 20:46:40 -0500 Received: (qmail 2918 invoked by uid 511); 6 Mar 2005 02:01:33 -0000 Received: from yml@dtlink.com by master.nbinteractive.com by uid 89 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(127.0.0.1):. Processed in 0.022436 secs); 06 Mar 2005 02:01:33 -0000 Received: from unknown (HELO secure.fieldpost.com) (yml@smtp.yml.com@127.0.0.1) by localhost with SMTP; 6 Mar 2005 02:01:33 -0000 Received: from 207.192.181.138 (SquirrelMail authenticated user yml@smtp.yml.com) by secure.fieldpost.com with HTTP; Sat, 5 Mar 2005 21:01:33 -0500 (EST) Message-ID: <64479.207.192.181.138.1110074493.squirrel@secure.fieldpost.com> Date: Sat, 5 Mar 2005 21:01:33 -0500 (EST) To: internals@lists.php.net Reply-To: yml@dtlink.com User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Subject: PHP 5.0.3 losing $this - followup. From: yml@dtlink.com ("Yermo Lamers") Thanks to michaels (at) crye-leike.com for the followup. He produced a much shorter version of the code that produces the same result: getThis(); } } $bar = new Foo(); $bar->destroyThis(); var_dump($bar); ?> Interestingly if you change the return( $this ) in &getThis() to return $this; the bug is reproduced. Weird, parentheses making the difference. I had thought it was related to the depth of subclasses and the particular arrangement of members; i.e. classic buffer overrun symptoms. So I stand corrected. As a followup question, if I have a large body of code for which I cannot produce a small test case what's the recommended approach to tracking it down .. pass it by here before posting the bug report? I've still got that weird PHP 4.3.10 bug that should also get resolved. ---------------------------------------------------------------------------- DTLink Software http://www.dtlink.com Desktop Software and Web Applications ----------------------------------------------------------------------------