Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions SPL/SPL_f.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,19 @@ function spl_object_hash(object $object): string {}
/**
* Copy the iterator into an array
* @link https://php.net/manual/en/function.iterator-to-array.php
* @template TKey
* @template TKey of int|string
* @template TValue
* @param Traversable<TKey, TValue> $iterator <p>
* @param Traversable<TKey, TValue>|array<TKey, TValue> $iterator <p>
* The iterator being copied.
* </p>
* @param bool $preserve_keys [optional] <p>
* Whether to use the iterator element keys as index.
* </p>
* @return array<TKey, TValue>|TValue[] An array containing the elements of the iterator.
* @return (
* $preserve_keys is true ? array<TKey, TValue> : (
* $preserve_keys is false ? TValue[] :
* array<TKey, TValue>|TValue[])
* ) An array containing the elements of the iterator.
*/
function iterator_to_array(#[LanguageLevelTypeAware(['8.2' => 'Traversable|array'], default: 'Traversable')] $iterator, bool $preserve_keys = true): array {}

Expand Down
Loading