public function myHistory() { echo "my grand father " . parent::gfAge(); echo "my father " . parent::fAge(); //we can also use the name of class instead of 'parent' echo "my " . $this->sAge(); }
public function myHistory() { echo "my grand father " . parent::gfAge(); echo "my father " . $this->fAge(); echo "my " . $this->sAge(); }