PHPackages                             clarence/matrix - 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. clarence/matrix

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

clarence/matrix
===============

Matrix -- a simple way to write fluent codes handing 2D data -- handling array of array is so easy!

v1.0.0(9y ago)021MITPHPPHP &gt;=5.5

Since May 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Clarence-pan/Matrix)[ Packagist](https://packagist.org/packages/clarence/matrix)[ RSS](/packages/clarence-matrix/feed)WikiDiscussions master Synced 1mo ago

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

Matrix [![](https://camo.githubusercontent.com/e4769179f184b5c49bb7dac18286aa3c48f7e6b7d6e23e7c38eef7bee1b6d665/68747470733a2f2f7472617669732d63692e6f72672f436c6172656e63652d70616e2f4d61747269782e737667)](https://camo.githubusercontent.com/e4769179f184b5c49bb7dac18286aa3c48f7e6b7d6e23e7c38eef7bee1b6d665/68747470733a2f2f7472617669732d63692e6f72672f436c6172656e63652d70616e2f4d61747269782e737667)
============================================================================================================================================================================================================================================================================================================================================================================================================

[](#matrix-)

Matrix - yet another tool for operating arrays, especially two-dimensional arrays.

Usage
=====

[](#usage)

Provided a data source containing two columns - productId and productName, if only rows whose productId is bigger than 5 are needed, and if a key-value structure (key is productName) is needed, it can be solved like this:

```
$data = Matrix::from($dataSource)
      ->select(array('productId' => 'id', 'productName'))
      ->where(function ($row) {
          return $row['id'] > 5;
      })
      ->orderBy('id', SORT_DESC)
      ->indexedBy('productName')
      ->toArray();

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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

3636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6440e0a9290b2e59c6c088202673fe19172717b7476ba4c821936a62d227d3f8?d=identicon)[Clarence-pan](/maintainers/Clarence-pan)

---

Top Contributors

[![Clarence-pan](https://avatars.githubusercontent.com/u/8750132?v=4)](https://github.com/Clarence-pan "Clarence-pan (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clarence-matrix/health.svg)

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

###  Alternatives

[aune-io/magento2-product-category-url-fix

Product category url fix for Magento 2

165.9k](/packages/aune-io-magento2-product-category-url-fix)

PHPackages © 2026

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