Question: i have an issue with function redeclaration problem. So, i am trying to call multiple times this example.

```
class myClass {

    function abc() {

        function internal() {

        return "i am internal"; 
        }

    return internal();
    }

}

$myClass = new myClass();

echo $myClass->abc();
echo $myClass->abc(); // HERE IS THE PROBLEM when i call same function second time

```

PHP showing Fatal error: Cannot redeclare internal() (previously declared).

Does anyone have an idea how can i solve this issue?

Thanks in advance.

Answer: 
You cant redeclare the function period so try something like this:

```
<?php 
class myClass {

    function abc() {
        return $this->internal();
    }

    private function internal() {
        return "i am internal";
    }

}
?>

```
Alternatively:

```
if (!function_exists('internal')) { function internal ... }

```

However, you have to be aware that in this case, the function internal will be available *outside* the class scope as well. Lawrence's solution is a better approach.