Re: New exceptions mechanism

From: Date: Tue, 03 Feb 2004 17:12:41 +0000
Subject: Re: New exceptions mechanism
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-7513@lists.php.net to get a copy of this message
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. -- Ferdinand Beyer <fb@fbeyer.com>

« previous php.internals (#7513) next »