From:             [EMAIL PROTECTED]
Operating system: linux 2.2
PHP version:      4.0.6
PHP Bug Type:     Class/Object related
Bug description:  scope of $this and static functions

When calling a static function from within another
class the $this - reference is not empty, but it points
to the class in which you call the static function. To
illustrate:

class Static
{ function method()
  { echo get_class($this);
  }
}

class Container
{ function Container()
  { Static::method();
  }
}

$Container = new Container();

The output is "Container", but there shouldn't be a reference, because it's
not anymore the scope of the
reference.
-- 
Edit bug report at: http://bugs.php.net/?id=12622&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to