Documentation
Fast Forward Iterators is a focused toolkit for building lazy, composable, and countable iteration pipelines in PHP. It helps you chunk data, group values, peek ahead, replay generators, combine multiple sources, and normalize different iterable inputs behind a consistent API.
This documentation is written for both audiences that usually meet in the same codebase:
- developers who want a safe first path through the package;
- experienced users who need a quick reference for edge cases and extension points.
Useful links
What this package is good at
- breaking large iterables into smaller pieces with chunking and sliding windows;
- transforming, trimming, filtering, and deduplicating values lazily;
- combining multiple sources sequentially, round-robin, or in lockstep;
- making generators reusable when your workflow needs more than one pass;
- providing reusable countable base classes for your own iterator abstractions.
Contents
- Getting Started
- Usage
- API Reference
- Advanced Topics
- Links & Resources
-
FAQ
- What package name should I install?
- Which class should I try first?
- Do I need to wrap arrays in ArrayIterator first?
- Why are some keys renumbered?
- Why does ZipIteratorIterator stop before the longest input ends?
- Why did SlidingWindowIteratorIterator return no values?
- What is the difference between GroupByIteratorIterator and ConsecutiveGroupIterator?
- How do I reuse a generator across multiple loops?
- How do I inspect what an iterator is producing?
- Can my closure see iterator keys?
- Does count() consume my iterator?
- Can I build my own iterators on top of this package?
- Do I need a framework or container integration?
- Compatibility