PHPackages                             kuria/iterable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. kuria/iterable

ActiveLibrary[Caching](/categories/caching)

kuria/iterable
==============

Utilities for dealing with PHP's iterators and the iterable type

v1.0.1(4y ago)05.0k↓50%3MITPHPPHP &gt;=7.1

Since Sep 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kuria/iterable)[ Packagist](https://packagist.org/packages/kuria/iterable)[ RSS](/packages/kuria-iterable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (3)

Iterable
========

[](#iterable)

Utilities for dealing with PHP's iterators and the iterable type.

[![https://travis-ci.com/kuria/iterable.svg?branch=master](https://camo.githubusercontent.com/cabf9d0d931ef8dd7d316691af4499fa00a7f1fb4a7667deb3a9faa9e58976ba/68747470733a2f2f7472617669732d63692e636f6d2f6b757269612f6974657261626c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/kuria/iterable)Contents

- [Features](#features)
- [Requirements](#requirements)
- [Usage](#usage)
    - [`IterableHelper::toArray()`](#iterablehelper-toarray)
    - [`IterableHelper::toList()`](#iterablehelper-tolist)
    - [`CachingIterator`](#cachingiterator)

[Features](#id1)
----------------

[](#features)

- converting iterable values to arrays
- caching iterator

[Requirements](#id2)
--------------------

[](#requirements)

- PHP 7.1+

[Usage](#id3)
-------------

[](#usage)

### [`IterableHelper::toArray()`](#id4)

[](#iterablehelpertoarray)

Convert an iterable value to an array.

```
