I have a parent class containing the funcB () function, which I would like to override with a better function, with just a few changes to this function. This function in the parent class calls another private function in the same class.
Code example:
class classA { private function funcA() { return "funcA called"; } public function funcB() { $result = $this->funcA(); return $result; } } class ClassB extends ClassA { public function funcB($a) {
I get a fatal error because I am not allowed to make a call to the private parent :: funcA () function from the ClassB class. But the call has to be made. How is this still possible?
source share