<?php class A { public function x() { $this->foo(); } protected function foo() { print "A"; } } class B extends A { public function foo() { print "B"; } } (new B)->x(); (new A)->x();
You have javascript disabled. You will not be able to edit any code.