How can FTP client cache affect the visibility of newly created directories in PHP?

When an FTP client caches directory listings, it may not immediately show newly created directories in PHP. To ensure that PHP can see the newly created directories, you can use the `clearstatcache()` function to clear the file status cache before checking for the existence of the directories.

// Clear the file status cache
clearstatcache();

// Check if the directory exists
if (is_dir('new_directory')) {
    echo 'New directory exists!';
} else {
    echo 'New directory does not exist.';
}