From manual :
The pseudo-variable $ this is available when the method is called from the context of the object. $ 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 the secondary object).
So, according to the second part, by design. Keep in mind that it uses the actual instance of the object in reality (in other words, if you add public $name = "SomethingElse"; in ExtraMethods , the result will be Hi, George ).
The method call statically is incorrect coding, but PHP forgives you and gives only a severe error:
"Strict Standards: Non-static method ExtraMethods::hi() should not be called statically, assuming $this from incompatible context in ..."
Of course, in this case, just passing the object as an argument will be much clearer and preferable.
source share