PHP - Inheritance and Polymorphism
What will be the output of this PHP code?
class A {
public function test() {
return "A";
}
}
class B extends A {
public function test() {
return "B";
}
}
class C extends B {
public function test() {
return parent::test();
}
}
$obj = new C();
echo $obj->test();