When a function having same name with different arguments it is called Function Overloading.
Example:
class calculate{
function add($a,$b){
return $a+$b;
}
function add($a,$b,$c){
return $a+$b+$c;
}
}
when we have two classes and derived class also have the same function as declared and define in its base class with same name and same signature it is known as Function Overriding.
Example:
class Parent{
function funOverriding() {
return “Parent”;
}
}
class Child extends Parent{
function funOverriding() {
return “Child”;
}
}
$parent= new Parent;
$child= new Child;
echo($parent->funOverriding()); //”It will refer to parent class function”
echo($child->funOverriding()); // “It will refer to child class function”
you can see in example that we can call particular function by pointing them with the object of that class.