Why is this only returning one file?
$iterator = new FilesystemIterator($absoluteDirectoryPath);
$regexIterator = new RegexIterator($iterator, $filter);
var_dump($regexIterator);
I just need a list of files and I can't see anywhere why this would be returning only one file. Heres the output:
RegexIterator {#7 ▼
+replacement: null
innerIterator: RecursiveIteratorIterator {#5 ▼
innerIterator: RecursiveDirectoryIterator {#4 ▼
path: "/home/**/**/**/**/**/**/**/home"
filename: "home.php"
basename: "home.php"
pathname: "/home/**/**/**/**/**/**/**/**/home.php"
I've blanked out the path of course. But theres only one entry, home.php, when theres at 4 files in this directory.