如果函数具有相同的外部函数名称,它会调用什么?

Ex- I want to know the concept of OOP for undermentioned code.

class main()
{
    function out(){
                  function out(){
                   } // What this call?
    }
}

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'