xref: /PHP-7.4/ext/spl/tests/bug31926.phpt (revision 610c7fbe)
1--TEST--
2Bug #31926 (php in free() error with RecursiveArrayIterator)
3--FILE--
4<?php
5
6$array = array(0 => array('world'));
7
8$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
9foreach($it as $key => $val) {
10   var_dump($key, $val);
11}
12
13?>
14--EXPECT--
15int(0)
16string(5) "world"
17