|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66702 RegexIterator::REGIT_INVERTED not implemented correctly
Submitted: 2014-02-12 20:09 UTC Modified: 2014-04-09 09:56 UTC
From: jthijssen+php at noxlogic dot nl Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: master-Git-2014-02-12 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jthijssen+php at noxlogic dot nl
New email:
PHP Version: OS:


 [2014-02-12 20:09 UTC] jthijssen+php at noxlogic dot nl
The REGIT_INVERTED flag which can be set through the RegexIterator::__construct() or RegexIterator::setMode() isn't inverting the current return value.

Test script:
$it = new \ArrayIterator(array("foo", "bar", "baz"));
$it = new \RegexIterator($it, "/^ba/", \RegexIterator::MATCH, 2);

Expected result:
   [0] => foo

Actual result:
    [1] => bar
    [2] => baz


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-28 19:34 UTC]
-Assigned To: +Assigned To: colder
 [2014-04-09 09:56 UTC]
-Status: Assigned +Status: Closed
 [2014-04-09 09:56 UTC]
Merged as of PHP-5.5
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 06:01:26 2020 UTC