What is the best practice for declaring and calling functions in PHP to avoid redeclaration errors?

When declaring and calling functions in PHP, it is important to check if the function already exists before declaring it to avoid redeclaration errors. This can be done using the `function_exists()` function. By checking if the function exists before declaring it, you can prevent any conflicts or errors that may arise from redeclaring the same function.

if (!function_exists('myFunction')) {
    function myFunction() {
        // Function implementation here
    }
}

// Call the function
myFunction();