PHPackages                             aznc/pipe-array - 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. aznc/pipe-array

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

aznc/pipe-array
===============

improve PHP array manipulation by Collection Pipeline pattern

1.0.0(10y ago)120MITPHPPHP &gt;=5.3.0

Since Jul 2Pushed 10y ago1 watchersCompare

[ Source](https://github.com/weichenlin/PHP-PipeArray)[ Packagist](https://packagist.org/packages/aznc/pipe-array)[ RSS](/packages/aznc-pipe-array/feed)WikiDiscussions master Synced 1mo ago

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

PipeArray
=========

[](#pipearray)

the PipeArray provide a way to manipulate array by Collection Pipeline pattern. although PHP has provide many array\_\* functions, they are a little annoying to combined together:

```
$score = [40, 55, 32, 63];

// add bonus and check passed score
$bonusScore = array_map(function($e){ return intval(sqrt($e) * 10); }, $score);
$passedScore = array_filter($bonusScore, function($e){ return $e >= 60; });
```

use the Collection Pipeline pattern are more clear:

```
$score = [40, 55, 32, 63];

// add bonus and check passed score
$passedScore = Pipe::Start($score)
                ->map(function($e){ return intval(sqrt($e) * 10); })
                ->filter(function($e){ return $e >= 60; })
                ->rawData();
```

Pipe::Start() return a instance of PipeArray which can used as normal array as well as by OO way:

```
$pArray = Pipe::Start([1, 2, 3, 4, 5]);
$pArray->push(6);
var_dump($pArray[5]); // print 6

$pArray->pop();
var_dump($pArray->count()); // print 5
```

the PipeArray can use like an array, but it's exactly an object. some array function require real PHP array, you can retrieve it by calling rawData() method:

```
$phpArray = Pipe::Start(...)->map(...)->rawData();
```

Most array\_\* functions are available in the PipeArray class, except:

- that didn't generate result from current array, like array\_fill
- that require another array as parameter, like array\_diff

also the function name has a little change:

- the "array\_" part are removed, for example, array\_key\_exists equals to PipeArray-&gt;key\_exists()
- it provide camel case method, for example, key\_exists() is an aliases for keyExists()

Install
=======

[](#install)

By Composer:

```
  "require": {
    "aznc/pipe-array": "^1.0.0"
  }
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3973d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c9ab59d3b5885da11238f6f77b36c964106d307f195b22f1b49bb1758451f9e?d=identicon)[weiclin](/maintainers/weiclin)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aznc-pipe-array/health.svg)

```
[![Health](https://phpackages.com/badges/aznc-pipe-array/health.svg)](https://phpackages.com/packages/aznc-pipe-array)
```

PHPackages © 2026

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