What are some best practices for including external files in PHP to avoid redeclaration errors?

When including external files in PHP, it's important to avoid redeclaration errors by checking if a function or class already exists before including the file. This can be done using functions like `function_exists()` or `class_exists()` to prevent duplicate declarations.

// Check if the function exists before including the file
if (!function_exists('myFunction')) {
    include 'myFile.php';
}

// Check if the class exists before including the file
if (!class_exists('MyClass')) {
    include 'myFile.php';
}