1--TEST--
2Handle object_iterator being destroyed before the RecursiveIteratorIterator object
3--FILE--
4<?php
5
6$dummy = new stdClass; // Dummy object to control object store ordering
7$it = new RecursiveIteratorIterator(new RecursiveArrayIterator([1]));
8unset($dummy);
9foreach ($it as $v) {
10    eval('class self {}'); // Cause a bailout.
11}
12?>
13--EXPECTF--
14Fatal error: Cannot use 'self' as class name as it is reserved in %s on line %d
15