PHPackages                             alcamo/iterator - 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. alcamo/iterator

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

alcamo/iterator
===============

Iterator-related stuff

0.1.4(2w ago)0114↑31.3%1Apache-2.0PHPPHP 7.3 - 8.5

Since Oct 22Pushed 2w agoCompare

[ Source](https://github.com/rv1971/alcamo-iterator)[ Packagist](https://packagist.org/packages/alcamo/iterator)[ RSS](/packages/alcamo-iterator/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (6)Used By (1)

Usage example
=============

[](#usage-example)

```
use alcamo\iterator\InputStreamLineIterator;

$iterator = new InputStreamLineIterator(fopen(__FILE__, 'r'));

foreach ($iterator as $line => $data) {
    printf("%3d %s\n", $line, $data);
}

```

This will output its own source file with line numbers.

Provided classes and traits
===========================

[](#provided-classes-and-traits)

- `IteratorCurrentTrait` provides a partial implementation of the `Iterator` interface so that a class using this trait just needs to implement the methods `rewind()` and `next()`.
- `InputStreamLineIterator` is an iterator class that reads lines from an input stream. Flags can be given e.g. to skip empty lines. Derived classes can easily add other features such as skipping comment lines.
- `FnmatchFilterIterator` is a filter iterator that filters filenames using `fnmatch()`.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance97

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~59 days

Total

5

Last Release

15d ago

PHP version history (2 changes)0.1PHP 7.3 - 8.0

0.1.4PHP 7.3 - 8.5

### Community

Maintainers

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

---

Top Contributors

[![rv1971](https://avatars.githubusercontent.com/u/39520256?v=4)](https://github.com/rv1971 "rv1971 (5 commits)")

---

Tags

iterator

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alcamo-iterator/health.svg)

```
[![Health](https://phpackages.com/badges/alcamo-iterator/health.svg)](https://phpackages.com/packages/alcamo-iterator)
```

###  Alternatives

[nikic/iter

Iteration primitives using generators

1.1k6.4M55](/packages/nikic-iter)[loophp/collection

A (memory) friendly, easy, lazy and modular collection class.

745762.4k16](/packages/loophp-collection)[athari/yalinqo

YaLinqo, a LINQ-to-objects library for PHP

4581.2M5](/packages/athari-yalinqo)[ihor/nspl

Non-standard PHP library (NSPL) - functional primitives toolbox and more

375369.6k](/packages/ihor-nspl)[ginq/ginq

LINQ to Object inspired DSL for PHP

192258.5k3](/packages/ginq-ginq)[chdemko/sorted-collections

Sorted Collections for PHP &gt;= 8.4

222.7M3](/packages/chdemko-sorted-collections)

PHPackages © 2026

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