Answer the question
In order to leave comments, you need to log in
PHP: how to call a method from a parent class that we have overridden?
Let's say we have a parent class:
class ParentClass {
protected $field;
public function showField() {
print($field);
}
}
class ChildClass extends ParentClass {
public function showField() {
/* ... code ... */
/* Вызов метода showField() из родительского класса */
/* ... code ... */
}
}
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