Using $this when not in object context php
I just started learning OOPS in php. I wrote a simple program for implementing inheritance. I am getting a fatal error of $this when not in object context. Can anyone explain me this error, what does it mean? here is my code: <?php class human{ public $gender; public function _construct($gender) { $this->gender=$gender; echo $this->get_gender(); } public function get_gender() { return $this->gender; } } class person extends human{ public $name; public $surname; public static function set_name($name) { $this->name=$name; } public static function set_surname($surname) { $this->surname=$surname;