1--TEST-- 2SPL: iterator_count() supports arrays. 3--FILE-- 4<?php 5 6var_dump(iterator_count([])); 7var_dump(iterator_count([1])); 8var_dump(iterator_count(['a' => 1, 'b' => 2, 5 => 3])); 9 10?> 11--EXPECT-- 12int(0) 13int(1) 14int(3) 15