What are the best practices for including external files in PHP functions?

When including external files in PHP functions, it is important to ensure that the file is included only once to avoid any conflicts or errors. One way to achieve this is by using the `require_once` or `include_once` functions, which will include the file only if it has not been included before. Additionally, it is a good practice to specify the full path of the file to avoid any ambiguity.

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