class On开发者_如何学Ce
{
private function thisfn()
{}
}
class Two
{
private function thisfn()
{}
}
is this legit? By the way, does it matter whether it's a private or public function inside a class?
And also, can I create a new function named thisfn()
outside of any class (and make it public)? like:
function thisfn()
{}
This is legit as long as you don't redeclare the same method name within the same class.
Declaring a function outside the scope of the classes with the same name is also valid.
精彩评论