--TEST-- Tests iterator_to_array() with non-scalar keys --FILE-- 0; yield 1 => 1; yield 2.5 => 2; yield null => 3; yield [] => 4; yield new stdClass => 5; } try { var_dump(iterator_to_array(gen())); } catch (Error $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- Illegal offset type