1--TEST--
2RecursiveIteratorIterator constructor should thrown if IteratorAggregate does not return Iterator
3--FILE--
4<?php
5
6class MyIteratorAggregate implements IteratorAggregate {
7    #[ReturnTypeWillChange]
8    function getIterator() {
9        return null;
10    }
11}
12
13try {
14    new RecursiveIteratorIterator(new MyIteratorAggregate);
15} catch (LogicException $e) {
16    echo $e->getMessage(), "\n";
17}
18
19?>
20--EXPECT--
21MyIteratorAggregate::getIterator() must return an object that implements Traversable
22