Re: New exceptions mechanism
| From: | Markus Fischer | Date: | Tue, 03 Feb 2004 17:19:59 +0000 |
| Subject: | Re: New exceptions mechanism | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7514@lists.php.net to get a copy of this message | ||
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