is it possible to echo a function inside another function using inheritance? please teach me how do it?
<?php
class Clinic extends Patient{
function getPatientsInfo(){
echo $this->GeneralInfo();
}
}
$patient = new Clinic;
$patient->getPatientsInfo();
CodePudding user response:
if GeneralInfo() is public or protected inside Patient class then you can use.