1--TEST-- 2SPL: ArrayIterator implementing RecursiveIterator 3--FILE-- 4<?php 5 6$array = array(1, 2 => array(21, 22 => array(221, 222), 23 => array(231)), 3); 7 8$dir = new RecursiveIteratorIterator(new RecursiveArrayIterator($array), RecursiveIteratorIterator::LEAVES_ONLY); 9 10foreach ($dir as $file) { 11 print "$file\n"; 12} 13 14?> 15--EXPECT-- 161 1721 18221 19222 20231 213 22