Answer the question
In order to leave comments, you need to log in
OOP Is child method called from parent class?
Is it possible to call a method in a parent class that is defined in a child class?
The first time I saw this ... maybe it seemed to me?
Usually the parent ones are called from the child.
Here is an example based on what I asked the question:
abstract class B extnds C {
function func_in_parent_class () {
$this->function_in_child_class()
}
}
class A extends B {
public function function_in_child_class () {
}
}
Answer the question
In order to leave comments, you need to log in
This is not a call to a child class method from a parent class. This child class can override the parent method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question