Re: Re: bug of the day: $this

From: Date: Fri, 06 Dec 2002 22:06:23 +0000
Subject: Re: Re: bug of the day: $this
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-92177@lists.php.net to get a copy of this message
Why do the (cheap) checks implemented in debug_backtrace not work for this? George On Friday, December 6, 2002, at 04:11 PM, Stig S. Bakken wrote:
It won't be different in ZE2. This is not a bug though, but a tricky design issue. The problem is figuring out at runtime when to set $this or not in a method. What most people would probably find intuitive, is that $this was set only in methods called in the object, but this would require pretty expensive checks for every method call. Andi can shed more light on this if needed. - Stig On Wed, 2002-12-04 at 00:25, Markus Fischer wrote:
    I think issue is/will be adressed in ZendEngine2 but I could
    be wrong. I suggest inquiring at the engine2 list.
On Tue, Dec 03, 2002 at 08:53:25PM +0000, Ivan Ristic wrote :
Balazs Nagy wrote:
Hi, $this stays defined when an instantatiated member function calls a non-instantiated member function.
Correct. I actually find it quite interesting. :) It can be useful at times, I have used it in my libraries as a feature. There is an interesting article on the subject: http://www.advogato.org/article/470.html
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.dev (#92177) next »