|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
7 + 16 = ?
Subscribe to this entry?

 [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-2021 The PHP Group
All rights reserved.
Last updated: Mon May 17 14:01:24 2021 UTC