Skip to content

Commit

Permalink
add failing test for bug #70868
Browse files Browse the repository at this point in the history
  • Loading branch information
marcioAlmada authored and laruence committed Nov 6, 2015
1 parent aa0d441 commit 283b627
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Zend/tests/bug70868.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--TEST--
Bug #70868, with PCRE JIT
--INI--
pcre.jit=1
--SKIPIF--
<?php if (!extension_loaded("pcre")) die("skip"); ?>
--FILE--
<?php

namespace X;

$iterator =
new \RegexIterator(
new \ArrayIterator(['A.phpt', 'B.phpt', 'C.phpt']),
'/\.phpt$/'
)
;

foreach ($iterator as $foo) {
var_dump($foo);
preg_replace('/\.phpt$/', '', '');
}

echo "Done", PHP_EOL;

?>
--EXPECTF--

string(6) "A.phpt"
string(6) "B.phpt"
string(6) "C.phpt"
Done

0 comments on commit 283b627

Please sign in to comment.