PHPackages                             slava-vishnyakov/map-reduce - 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. slava-vishnyakov/map-reduce

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

slava-vishnyakov/map-reduce
===========================

MapReduce implementation

1.0.3(8y ago)018MITPHP

Since Apr 17Pushed 8y agoCompare

[ Source](https://github.com/slava-vishnyakov/php-map-reduce)[ Packagist](https://packagist.org/packages/slava-vishnyakov/map-reduce)[ RSS](/packages/slava-vishnyakov-map-reduce/feed)WikiDiscussions master Synced 2mo ago

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

To install:

```
composer require slava-vishnyakov/map-reduce

```

```
use \SlavaVishnyakov\MapReduce\MapReduceMemory;

$m = new MapReduceMemory(); // or MapReduceProcess
$m->send('a', 1);
$m->send('b', 1);
$m->send('a', 2);

foreach($m->iter() as $key => $groups) {
// yields
$key = 'a', $groups = [1,2]
$key = 'b', $groups = [1]
```

Also can be done via next() calls:

```
$m = new MapReduceMemory(); // or MapReduceProcess
$m->send('a', 1);
$m->send('b', 1);
$m->send('a', 2);
$m->send('a', new stdClass);

$m->next() ==> ['a', [1, 2, new stdClass]]
$m->next() ==> ['b', [1]]
$m->next() ==> null
```

There are two implementations `MapReduceMemory` and `MapReduceProcess`.

The first does all sorting in memory, the second is for memory-hungry workloads, uses `/usr/bin/sort` to process basically unlimited amount of data.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~0 days

Total

6

Last Release

2944d ago

Major Versions

0.2 → 1.02018-04-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fe3ffd1a2a15375a6cede03c09170a80bb6fdda4fa0afd4b1b57d4a80b4d8c5?d=identicon)[slava-vishnyakov](/maintainers/slava-vishnyakov)

---

Top Contributors

[![slava-vishnyakov](https://avatars.githubusercontent.com/u/817931?v=4)](https://github.com/slava-vishnyakov "slava-vishnyakov (13 commits)")

---

Tags

map-reducemapreducephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/slava-vishnyakov-map-reduce/health.svg)

```
[![Health](https://phpackages.com/badges/slava-vishnyakov-map-reduce/health.svg)](https://phpackages.com/packages/slava-vishnyakov-map-reduce)
```

###  Alternatives

[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688335.4M63](/packages/symfony-polyfill-uuid)[spatie/error-solutions

This is my package error-solutions

6853.2M11](/packages/spatie-error-solutions)[phpflo/phpflo

Flow-based programming for PHP

2173.3k4](/packages/phpflo-phpflo)[eftec/autoloadone

AutoloadOne is a program that generates an autoload class for PHP.

403.4k](/packages/eftec-autoloadone)[ys-tools/default-theme-configuration-bundle

OroCommerce Default Theme Configuration Bundle

124.2k](/packages/ys-tools-default-theme-configuration-bundle)

PHPackages © 2026

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