On Tue, Feb 03, 2004 at 06:12:41PM +0100, Ferdinand Beyer wrote :
> On 3 Feb 2004 at 17:34, Markus Fischer wrote:
>
> > However, shouldn't the context be enough, from which a
> function is
> > called, so the stack trace displays the information right?
>
> This is my guess:
> In your example staticMethod() is not regarded as a _static_
> function. Instead, PHP runs it in the InstanciateMe-object's scope as
> if it would belong to the InstanciateMe class. If you try to access $this
> in staticMethod() it will certainly be the same as $obj.
>
> This behavior is needed to access overwritten methods from the
> parent class. In my opinion, it should not work for foreign classes,
> though.
Point taken. I can definitely live by the additional static keyword
anyway.
thanks,
- Markus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php