If in php i can create something like parentClass -> childCluss -> sbuChildClass in inheritance? Or child can have only one parent ?
somthink like:
class base {
function connection();
}
class child extend base {
function check_some(){
$tmp = parent::cpnnection();
}
}
class subchild extend child{
function check_else(){
check_some();
}
}
I know that in Java i can create some subchild and use a child or parent methods but in php i tried and it faild.
in my example it must connect to db with pdo and it return datal error prepare() null
New contributor
Name is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.