I have a code here,
class someClass { public $someMember; public function __construct() { $this->someMember = 1; } public static function getsomethingstatic() { return $this->someMember * 5; } } $obj = new someClass(); echo $obj::getsomethingstatic(); and return an error, I know it has something to do with static but I couldn't find good explanation. I know how to fix this, I'm just looking for an explanation which will add to my understanding.
Anyone?
$thisis an instance reference, and as such cannot be used in astatic(non instance) method