[php-src] Issue #7730: RecursiveRegexIterator

From: Date: Tue, 07 Dec 2021 12:13:06 +0000
Subject: [php-src] Issue #7730: RecursiveRegexIterator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238252@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7730 Comment Author: iluuu1994 Dateiablage Kommentare * Das Widget ist jeweils unterhalb der Beiträge platziert * Geht nicht, da die Liste ja endlos scrollt @WinterSilence The same applies to RecursiveRegexIterator, it's a recursive iterator. You'll need a RecursiveIteratorIterator to flatten it's result. ```php $directory = new RecursiveDirectoryIterator(__DIR__); $regex = new RecursiveRegexIterator( $directory, '/((?:[A-Z][a-zA-Z\d]+\/)*[A-Z][a-zA-Z\d]+)\.php$/', RegexIterator::GET_MATCH, RegexIterator::USE_KEY ); $iterator = new RecursiveIteratorIterator($regex); var_dump(iterator_to_array($iterator)); ``` There is, however, something fishy going on. This snippet yields no results. However, changing the regex to /.*/ yields all the files, including files ending in .php. Even /\.php$/ doesn't seem to work. This will need some further investigation.

« previous php.bugs (#238252) next »