getThis and static methods

From: Date: Thu, 31 Jan 2008 07:51:16 +0000
Subject: getThis and static methods
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5092@lists.php.net to get a copy of this message
Hi! If a static function is invoked, should I explicitly check object's class and its derived ones. Is there any API functionality which tells me that static call is made? I mean ZE2. Let's say function foo is implemented in extension and does something with object's pointer, if this one is available with getThis(). Now on PHP level I use it in another class' member: class bar extends foo { some_method() { foo::abc(); /* _may_ be called statically */ } } foo::abc gets $this pointer via getThis(), which is not correct, as $this pointer should be only foo class' instance in this scope. Am I right or completely wrong here? Piotras

« previous php.pecl.dev (#5092) next »