PHPackages                             praswicaksono/lazy-collection - 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. praswicaksono/lazy-collection

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

praswicaksono/lazy-collection
=============================

591PHP

Since Mar 9Pushed 10y ago2 watchersCompare

[ Source](https://github.com/praswicaksono/lazy-collection)[ Packagist](https://packagist.org/packages/praswicaksono/lazy-collection)[ RSS](/packages/praswicaksono-lazy-collection/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Lazy Collection
===============

[](#lazy-collection)

[![Build Status](https://camo.githubusercontent.com/00844494b999c275f18cdb490f6f391a02ea9d183685952bbdf68a511df68ef3/68747470733a2f2f7472617669732d63692e6f72672f70726173776963616b736f6e6f2f6c617a792d636f6c6c656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/praswicaksono/lazy-collection)

This collection implement [nikic/iter](https://github.com/nikic/iter) to provide lazy initialization and operation by using `Generator`

Installation
============

[](#installation)

`composer require praswicaksono/lazy-collection dev-master`

Usage
=====

[](#usage)

Construct From Generator
------------------------

[](#construct-from-generator)

```
$iterable = function () {
    for ($i = 1; $i filter(function ($value) {
        return $value > 30;
    })
    ->reduce(function ($acc, $value, $startValue) {
        return $acc + $value;
    });

// $result = 90
```

For more information, checkout the `test` suite.

Contribute
==========

[](#contribute)

PRs are welcome!

License
=======

[](#license)

MIT

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/023a0bd17758df473ae6dad9f07575a8d0a8c36b06e83396b5962aecba38c722?d=identicon)[PrasWicaksono](/maintainers/PrasWicaksono)

---

Top Contributors

[![andylibrian](https://avatars.githubusercontent.com/u/1214976?v=4)](https://github.com/andylibrian "andylibrian (1 commits)")

### Embed Badge

![Health badge](/badges/praswicaksono-lazy-collection/health.svg)

```
[![Health](https://phpackages.com/badges/praswicaksono-lazy-collection/health.svg)](https://phpackages.com/packages/praswicaksono-lazy-collection)
```

###  Alternatives

[klaussilveira/simple-shm

SimpleSHM is a simple and small abstraction layer for shared memory manipulation using PHP.

1357.2k1](/packages/klaussilveira-simple-shm)

PHPackages © 2026

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