Bug #66702 [Asn->Csd]: RegexIterator::REGIT_INVERTED not implemented correctly
| From: | colder@php.net | Date: | Wed, 09 Apr 2014 09:56:42 +0000 |
| Subject: | Bug #66702 [Asn->Csd]: RegexIterator::REGIT_INVERTED not implemented correctly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185151@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66702&edit=1
ID: 66702
Updated by: colder@php.net
Reported by: jthijssen+php at noxlogic dot nl
Summary: RegexIterator::REGIT_INVERTED not implemented
correctly
-Status: Assigned
+Status: Closed
Type: Bug
Package: SPL related
PHP Version: master-Git-2014-02-12 (Git)
Assigned To: colder
Block user comment: N
Private report: N
New Comment:
Merged as of PHP-5.5
Previous Comments:
------------------------------------------------------------------------
[2014-02-12 20:09:24] jthijssen+php at noxlogic dot nl
Description:
------------
The REGIT_INVERTED flag which can be set through the RegexIterator::__construct() or
RegexIterator::setMode() isn't inverting the current return value.
Test script:
---------------
<?php
$it = new \ArrayIterator(array("foo", "bar", "baz"));
$it = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, 2);
print_r(iterator_to_array($it));
Expected result:
----------------
array(
[0] => foo
)
Actual result:
--------------
Array
(
[1] => bar
[2] => baz
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66702&edit=1