Re: New exceptions mechanism

From: Date: Tue, 03 Feb 2004 20:51:00 +0000
Subject: Re: New exceptions mechanism
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-7518@lists.php.net to get a copy of this message
Hello Markus, Tuesday, February 3, 2004, 6:19:59 PM, you wrote: > 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 You should enable E_STRICT severity by error_reporting: E_ALL|E_STRICT when developing new things. Besides from that the behavior is needed for BC reasons only. -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#7518) next »