Re: Coding standards

From: Date: Wed, 18 Jul 2001 14:07:08 +0000
Subject: Re: Coding standards
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-867@lists.php.net to get a copy of this message
At 09:37 2001-07-18 -0400, you wrote:
Quoting "Stig S. Bakken" <Stig.Bakken@fast.no>:
Actually, you can't rely on that - if you call a static method from
within
another object, then $this will be the $this of that other object.
Uhh, that's qualifies as this week's "WTF" candicate. I raised this issue on php-dev months ago, and no one seemed to think it was a problem... *shrug* -chuck
I got some strange behaviour when doing: class Foo { function foobar() {
    echo $this;
} } class Bar { function foobar() {
    $this = 'WTF!';
    Foo::foobar();
} } Bar::foobar(); Oh well, I think a situation like that is unlikely to happen anyway. /erik hjortsberg

« previous php.pear.dev (#867) next »