Created
March 24, 2017 15:25
-
-
Save Philosoft/d867cf9c5c495720c452c75724fb3de3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = new RecursiveDirectoryIterator(__DIR__); | |
$iter = new RecursiveIteratorIterator($dir); | |
$regex = new RegexIterator($iter, '#^.*index\.php$#i', RecursiveRegexIterator::GET_MATCH); | |
foreach ($regex as $fileArray) { | |
echo $fileArray[0] . PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment