Bug #68128 [NEW]: Regression in RecursiveRegexIterator
| From: | ivan dot enderlin at hoa-project dot net | Date: | Wed, 01 Oct 2014 22:00:06 +0000 |
| Subject: | Bug #68128 [NEW]: Regression in RecursiveRegexIterator | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187786@lists.php.net to get a copy of this message | ||
From: ivan dot enderlin at hoa-project dot net
Operating system:
PHP version: master-Git-2014-10-01 (Git)
Package: *General Issues
Bug Type: Bug
Bug description:Regression in RecursiveRegexIterator
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 bug report at https://bugs.php.net/bug.php?id=68128&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68128&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68128&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68128&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68128&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68128&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68128&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68128&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68128&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68128&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68128&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68128&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68128&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68128&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68128&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68128&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68128&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68128&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68128&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68128&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68128&r=mysqlcfg