note 98057 deleted from language.oop5.static by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: John Inhendersonnv 

----

@ myselfasunder at gmail dot com

This is actually the expected behavior. As the manual states:

The pseudo-variable $this is available when a method is called from within an object context. $this is a reference to the calling object (usually the object to which the method belongs, but possibly another object, if the method is called statically from the context of a secondary object).

http://us.php.net/manual/en/language.oop5.basic.php

If use error_reporting(E_STRICT), your script will warn against this: 

PHP Strict Standards:  Non-static method CalledClass::go() should not be called statically, assuming $this from incompatible context in /path-to-file on line #n
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.