Are there any recommended best practices for handling file existence checks in PHP?

When checking for the existence of a file in PHP, it is recommended to use the `file_exists()` function. This function returns `true` if the file exists and `false` if it does not. It is important to handle the case where the file may not exist to prevent errors in your code.

$filename = 'example.txt';

if (file_exists($filename)) {
    echo "File exists.";
} else {
    echo "File does not exist.";
}