Easy example for understanding:
<?php
$iterator = new ParentIterator(
    new RecursiveArrayIterator(
        array(array(1, 2, 3), 'A', 'B', 'C')
    )
);
foreach ($iterator as $recursive) {
    foreach ($recursive as $value) {
        echo $value . PHP_EOL;
    }
}
?>
1
2
3