What are best practices for handling PHP errors and warnings when using include statements?

When using include statements in PHP, it is essential to handle errors and warnings that may arise if the included file is not found or contains syntax errors. One best practice is to use the `require_once` function instead of `include` to ensure that the file must be included successfully for the script to continue running. Additionally, you can use `try-catch` blocks to catch any exceptions that may occur during the include process and handle them gracefully.

try {
    require_once('file.php');
} catch (Exception $e) {
    echo 'An error occurred: ' . $e->getMessage();
}