Parent::__construct($name); $this->scholling = $scholling; } public function getage() { return Parent::getage() . ' years'; } public function setScholling($scholling) { $this->scholling = $scholling; } public function getScholling() { return $this->scholling; } public function getDetails() { Parent::getDetails(); echo $this->getScholling(); } } $p = new Child('dileep', 'Holy city'); $p->setName('sunil'); $p->setage('24'); $p->getDetails(); echo '<br/>'; $p1 = new Person('Lalit'); $p1->setage('24'); echo $p1->getName(); echo $p1->getage(); $p1->getDetails();