i think what you were looking for is shadowing? there is no good answer as this has nothing to do with OOP and your example could have been better.
overloading refers to same identifier different method signature
function foo()
function foo($param)
overriding refers to a child class defining a method with the same signature as a method in the parent class.
class parent {
public function foo(){return 1;}
}
class child extends parent {
public function foo(){return 2;}
}
shadowing refers to when an identifier in a lower scope has the same identifer as something in a higher scope.
$var = 5;
function foo($var){
echo $var;
}
foo(6); // '6'
echo $var; // '5'
solved What it call if function with same name of outer function?