Converts an iterable to an array.
Parameters
$items<span class="iterable”>iterablerequired- The iterable to convert.
Source
private function iterable_to_array( $items ): array {
if ( is_array( $items ) ) {
return $items;
}
return iterator_to_array( $items );
}
Changelog
| Version | Description |
|---|---|
| 7.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.