fast-forward/iterators

A robust and optimized library for advanced PHP Iterators.

Maintainers

Package info

github.com/php-fast-forward/iterators

Homepage

pkg:composer/fast-forward/iterators

Statistics

Installs: 66

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.2.0 2026-03-31 14:55 UTC

This package is auto-updated.

Last update: 2026-03-31 15:24:54 UTC


README

PHP Version License

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

  • ๐Ÿ” Advanced and composable iterator types
  • ๐Ÿ‘€ Lookahead and peeking support
  • ๐Ÿงผ Filtering and mapping
  • ๐Ÿงฉ Grouping, chunking, and flattening
  • ๐Ÿงช Fully tested, mutation safe, and statically analyzed

๐Ÿ“ฆ Installation

Install via Composer:

composer require php-fast-forward/iterators

Requirements: PHP 8.3 or higher

๐Ÿš€ 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

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 & Examples

๐Ÿค Contributing

Contributions, bug reports and suggestions are welcome! Please open an issue or pull request on GitHub.

๐Ÿง‘โ€๐Ÿ’ป Author

Felipe Sayรฃo Lobato Abreu
github@mentordosnerds.com

๐Ÿ“„ License

This project is licensed under the MIT License.