<?php class ParentClass { protected function getter() { return 'parent getter'; } } class ChildClass extends ParentClass { public function getter() { return 'child getter'; } } $foo = new ChildClass(); echo $foo->getter();
You have javascript disabled. You will not be able to edit any code.