xref: /PHP-8.4/ext/spl/tests/bug54281.phpt (revision 15bbf6f3)
1--TEST--
2Bug #54281 (Crash in spl_recursive_it_rewind_ex)
3--FILE--
4<?php
5
6class RecursiveArrayIteratorIterator extends RecursiveIteratorIterator {
7    function __construct($it, $max_depth) { }
8}
9$it = new RecursiveArrayIteratorIterator(new RecursiveArrayIterator(array()), 2);
10
11foreach($it as $k=>$v) { }
12
13?>
14--EXPECTF--
15Fatal error: Uncaught Error: Object is not initialized in %s:%d
16Stack trace:
17#0 {main}
18  thrown in %s%ebug54281.php on line 8
19