|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 20:01:31 2024 UTC