Answer the question
In order to leave comments, you need to log in
How to call parent method in php?
Good afternoon! Faced with the question, how do I call the parent method, which is also called the method of the child class?
class A{
public function foo(){return 1;}
}
class B extends A(){
public function foo(){
/* нужно вызвать родительский foo() */
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question