Method with same name but diffrent parameter is called method overloading.

class Addition {
function compute($first, $second) {
return $first+$second;
}

function compute($first, $second, $third) {
return $first+$second+$third;
}
}
$obj1 = new Addition;
$obj1->compute('2','2');