As you see in below PHP code there are two classes A & B. In both show methods defined but with different arguments.
<?php
class A{
public function show($fvar,$svar){
echo 'In second.';
}
}
class B extends A{
public function show(){
echo 'In first ';
}
}
$obj=new B();
$obj->show("First Var","Second Var");
?>
// Output : In first
As per my understanding of object oriented programming call to show function need to execute method in A. What I am missing here ? Does there exist different rules in PHP.