xref: /PHP-8.0/ext/spl/tests/bug74519.phpt (revision f8d79582)
1--TEST--
2Bug #74519 strange behavior of AppendIterator
3--FILE--
4<?php
5
6$iterator = new \AppendIterator();
7$events = new \ArrayIterator([1,2,3,4,5]);
8$iterator->append($events);
9
10$events->next();
11
12while($iterator->valid()) {
13    echo $iterator->current(), "\n";
14    $iterator->next();
15}
16?>
17--EXPECT--
182
193
204
215
22