xref: /PHP-7.4/ext/spl/tests/bug70868.phpt (revision f5e47718)
1--TEST--
2Bug #70868, with PCRE JIT
3--INI--
4pcre.jit=1
5--FILE--
6<?php
7
8namespace X;
9
10$iterator =
11    new \RegexIterator(
12        new \ArrayIterator(['A.phpt', 'B.phpt', 'C.phpt']),
13        '/\.phpt$/'
14    )
15;
16
17foreach ($iterator as $foo) {
18    var_dump($foo);
19    preg_replace('/\.phpt$/', '', '');
20}
21
22echo "Done", PHP_EOL;
23
24?>
25--EXPECT--
26string(6) "A.phpt"
27string(6) "B.phpt"
28string(6) "C.phpt"
29Done
30