What best practices should be followed when including external PHP classes in a script?

When including external PHP classes in a script, it is important to follow best practices to ensure the script runs smoothly and efficiently. One common practice is to use the `require_once` or `include_once` functions to include the external class files only once to avoid redeclaration issues. Additionally, it is recommended to use namespaces to prevent naming conflicts with other classes. Finally, make sure to autoload classes using Composer or a custom autoloader to automatically load classes when needed.

// Include external class file using require_once
require_once 'path/to/ExternalClass.php';

// Use namespaces to prevent naming conflicts
use Namespace\ExternalClass;

// Autoload classes using Composer or custom autoloader
require 'vendor/autoload.php';