xref: /PHP-8.4/ext/spl/tests/gh14290.phpt (revision b3a56bd5)
1--TEST--
2GH-14290 (Member access within null pointer in extension spl)
3--INI--
4pcre.backtrack_limit=2
5pcre.jit=0
6--FILE--
7<?php
8$h = new ArrayIterator(['test' => 'test1']);
9$i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE);
10foreach ($i as $name => $value) {
11    var_dump($name, $value);
12}
13echo "Done\n";
14?>
15--EXPECT--
16Done
17