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

[aimeos/aimeos-base

Aimeos base layer for abstracting from host environments

2.1k134.0k1](/packages/aimeos-aimeos-base)[microweber/screen

A PHP Class to interact with PhantomJs and capture screenshot of a webpage

632226.0k1](/packages/microweber-screen)[fuel/docs

FuelPHP 1.x Documenataion

166542.3k4](/packages/fuel-docs)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)[fof/user-directory

The permission based public user directory extension for your Flarum forum.

2789.7k5](/packages/fof-user-directory)

PHPackages © 2026

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