What function in PHP can be used to verify the existence of a folder?

To verify the existence of a folder in PHP, you can use the `file_exists()` function. This function checks whether a file or directory exists at a specified path. By using this function with the folder path as an argument, you can determine if the folder exists in the specified location.

$folderPath = '/path/to/folder';

if (file_exists($folderPath) && is_dir($folderPath)) {
    echo "Folder exists.";
} else {
    echo "Folder does not exist.";
}