PHPackages                             fast-forward/iterators - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fast-forward/iterators

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fast-forward/iterators
======================

A robust and optimized library for advanced PHP Iterators.

v1.2.0(1mo ago)0882MITPHPPHP ^8.3CI passing

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/php-fast-forward/iterators)[ Packagist](https://packagist.org/packages/fast-forward/iterators)[ Docs](https://github.com/php-fast-forward)[ RSS](/packages/fast-forward-iterators/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (2)

FastForward\\Iterators
======================

[](#fastforwarditerators)

[![PHP Version](https://camo.githubusercontent.com/3cd770b20545837658262654c7c1cdb3b59cd82ebca19d6408dfe66b0ff9430f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e332532422d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/b138979332279e90f73935f844f757dfc0077fcb4d7667757fcfdfbaf9549690/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068702d666173742d666f72776172642f6974657261746f7273)](https://opensource.org/licenses/MIT)

A robust and optimized library for advanced PHP Iterators.

Enhance your PHP applications with high-performance iterators: lookahead, peeking, filtering, grouping, chunking, and more.

---

✨ Features
----------

[](#-features)

- 🔁 Advanced and composable iterator types
- 👀 Lookahead and peeking support
- 🧼 Filtering and mapping
- 🧩 Grouping, chunking, and flattening
- 🧪 Fully tested, mutation safe, and statically analyzed

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require fast-forward/iterators
```

**Requirements:** PHP 8.3 or higher

🚀 Quickstart
------------

[](#-quickstart)

```
use FastForward\Iterator\ChunkedIteratorAggregate;

$data = range(1, 10);
$chunked = new ChunkedIteratorAggregate($data, 3);
foreach ($chunked as $chunk) {
	print_r($chunk);
}
```

**Expected output:**

```
Array
(
	[0] => 1
	[1] => 2
	[2] => 3
)
Array
(
	[0] => 4
	[1] => 5
	[2] => 6
)
Array
(
	[0] => 7
	[1] => 8
	[2] => 9
)
Array
(
	[0] => 10
)

```

🛠 Usage Patterns
----------------

[](#-usage-patterns)

All iterators and utilities are available under the `FastForward\Iterator` namespace. Simply require Composer's autoloader:

```
require_once 'vendor/autoload.php';
use FastForward\Iterator\ChunkedIteratorAggregate;
use FastForward\Iterator\SlidingWindowIteratorIterator;
// ...
```

You can chain, compose, and adapt iterators for a wide variety of data processing tasks.

📚 Documentation &amp; Examples
------------------------------

[](#-documentation--examples)

- 📖 [Full Documentation](https://github.com/php-fast-forward/iterators/tree/main/docs)
- 🧑‍💻 [Examples Directory](https://github.com/php-fast-forward/iterators/tree/main/examples)
    - Each file demonstrates a specific iterator or pattern:
        - [chunked-iterator-aggregate.php](https://github.com/php-fast-forward/iterators/blob/main/examples/chunked-iterator-aggregate.php)
        - [sliding-window-iterator-iterator.php](https://github.com/php-fast-forward/iterators/blob/main/examples/sliding-window-iterator-iterator.php)
        - [unique-iterator-iterator.php](https://github.com/php-fast-forward/iterators/blob/main/examples/unique-iterator-iterator.php)
        - [lookahead-iterator.php](https://github.com/php-fast-forward/iterators/blob/main/examples/lookahead-iterator.php)
        - ...and more!

🤝 Contributing
--------------

[](#-contributing)

Contributions, bug reports and suggestions are welcome! Please open an issue or pull request on [GitHub](https://github.com/php-fast-forward/iterators).

🧑‍💻 Author
----------

[](#‍-author)

**Felipe Sayão Lobato Abreu**

📄 License
---------

[](#-license)

This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance91

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~172 days

Total

3

Last Release

47d ago

PHP version history (3 changes)v1.0.0PHP ^7.4 || ^8.0

v1.1.0PHP ^8.1

v1.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb658791d4db57e57ac164a268f94340ddff4d1ee0aad1358d4593847051a9fe?d=identicon)[coisa](/maintainers/coisa)

---

Top Contributors

[![coisa](https://avatars.githubusercontent.com/u/426835?v=4)](https://github.com/coisa "coisa (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")

---

Tags

iterateiterationiteratorphp-libraryphpiteratorsiterator utilitiesiterator aggregateiterator iteratorfast-forward

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fast-forward-iterators/health.svg)

```
[![Health](https://phpackages.com/badges/fast-forward-iterators/health.svg)](https://phpackages.com/packages/fast-forward-iterators)
```

###  Alternatives

[doctrine/collections

PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.

6.0k411.1M1.2k](/packages/doctrine-collections)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
