summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug70868.phpt
blob: d3dd76354a25331ce36cb6b75e70d8bfcf0c0607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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