Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 684 Bytes

iterator_to_array.md

File metadata and controls

30 lines (20 loc) · 684 Bytes
title iterator_to_array()
description Copy the iterator into an array.

iterator_to_array()

function iterator_to_array(traversable $iterator, bool $preserve_keys = true): array

Copy the iterator into an array.

Parameters:

  • $iterator (traversable)
  • $preserve_keys (bool), default true, optional

Returns: array

Availability

Compiled (AOT) Magician (eval)
Available Available

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how iterator_to_array is implemented in the compiler, see the internals page.