Bug #68128 [Opn]: Regression in RecursiveRegexIterator

From: Date: Sun, 05 Oct 2014 10:15:06 +0000
Subject: Bug #68128 [Opn]: Regression in RecursiveRegexIterator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187857@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68128&edit=1 ID: 68128 User updated by: ivan dot enderlin at hoa-project dot net Reported by: ivan dot enderlin at hoa-project dot net Summary: Regression in RecursiveRegexIterator Status: Open Type: Bug Package: *General Issues PHP Version: master-Git-2014-10-01 (Git) Block user comment: N Private report: N New Comment: Also happens in PHP5.6.2-dev. Previous Comments: ------------------------------------------------------------------------ [2014-10-01 22:00:05] ivan dot enderlin at hoa-project dot net Description: ------------ There is a regression in the RecursiveRegexIterator iterator. Detected by the failure of a test in the Hoa\Iterator library. Test script from the documentation (http://php.net/recursiveregexiterator.construct). Test script: --------------- <?php $rArrayIterator = new RecursiveArrayIterator(array('test1', array('tet3', 'test4', 'test5'))); $rRegexIterator = new RecursiveRegexIterator($rArrayIterator, '/^test/', RecursiveRegexIterator::ALL_MATCHES); foreach ($rRegexIterator as $key1 => $value1) { if ($rRegexIterator->hasChildren()) { // print all children echo "Children: "; foreach ($rRegexIterator->getChildren() as $key => $value) { echo $value . " "; } echo "\n"; } else { echo "No children\n"; } } ?> Expected result: ---------------- No children Children: test4 test5 Actual result: -------------- Aucun fils disponible PHP Notice: Array to string conversion in /tmp/a.php on line 6 Notice: Array to string conversion in /tmp/a.php on line 6 Fils : test4 test5 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68128&edit=1

« previous php.bugs (#187857) next »