Re: Re: bug of the day: $this

From: Date: Fri, 06 Dec 2002 21:11:18 +0000
Subject: Re: Re: bug of the day: $this
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-92175@lists.php.net to get a copy of this message
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

« previous php.dev (#92175) next »