What best practices should be followed when including external files and classes in PHP code?

When including external files and classes in PHP code, it is important to follow best practices to ensure smooth execution and maintainability. One common practice is to use the `require_once` or `include_once` functions to include files, as they prevent duplicate inclusion and potential conflicts. Additionally, it is recommended to use namespaces for classes to avoid naming collisions and improve code organization.

// Include an external PHP file using require_once
require_once 'path/to/file.php';

// Include an external PHP file using namespaces for classes
namespace MyNamespace;
include 'path/to/MyClass.php';

// Instantiate a class from the included file
$obj = new MyClass();