note 98057 added to language.oop5.static

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
@ 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
----
Server IP: 64.71.164.2
Probable Submitter: 24.234.125.75
----
Manual Page -- http://www.php.net/manual/en/language.oop5.static.php
Edit        -- https://master.php.net/note/edit/98057
Del: integrated  -- https://master.php.net/note/delete/98057/integrated
Del: useless     -- https://master.php.net/note/delete/98057/useless
Del: bad code    -- https://master.php.net/note/delete/98057/bad+code
Del: spam        -- https://master.php.net/note/delete/98057/spam
Del: non-english -- https://master.php.net/note/delete/98057/non-english
Del: in docs     -- https://master.php.net/note/delete/98057/in+docs
Del: other reasons-- https://master.php.net/note/delete/98057
Reject      -- https://master.php.net/note/reject/98057
Search      -- https://master.php.net/manage/user-notes.php
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.