<?php class A { public function something() { // important logic $this->onSomethingHook(); // more important logic } } class B extends A { protected function onSomethingHook() { // Custom logic here, which will be called from class A echo 'Hello'; } } $b = new B; $b->something();
You have javascript disabled. You will not be able to edit any code.