What are the limitations of using RecursiveDirectoryIterator in PHP when dealing with links in Windows?

When using RecursiveDirectoryIterator in PHP on Windows, it does not follow symbolic links by default. To include symbolic links in the iteration, you can use the RecursiveIteratorIterator with the RecursiveDirectoryIterator and set the mode to RecursiveIteratorIterator::SELF_FIRST.

$directory = new RecursiveDirectoryIterator('path/to/directory');
$iterator = new RecursiveIteratorIterator($directory, RecursiveIteratorIterator::SELF_FIRST);

foreach ($iterator as $file) {
    echo $file->getPathname() . PHP_EOL;
}