PHPackages                             yurybykov/array\_order\_by - 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. yurybykov/array\_order\_by

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

yurybykov/array\_order\_by
==========================

A PHP function to database-style order an array.

v1.3.0(6y ago)0893↓80.3%UnlicensePHPPHP &gt;=5.6.0

Since May 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yurybykov/php_array_order_by)[ Packagist](https://packagist.org/packages/yurybykov/array_order_by)[ Docs](https://github.com/yurybykov/php_array_order_by)[ RSS](/packages/yurybykov-array-order-by/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

array\_order\_by
================

[](#array_order_by)

A PHP function to database-style order an array. I am not author of original function, it was taken from

Install
-------

[](#install)

Normal install via Composer.

Usage
-----

[](#usage)

Throw any array or object with the coordinates of the field you want to sort by:

```
$data = [];
$data[] = array('volume' => 67, 'edition' => 2);
$data[] = array('volume' => 86, 'edition' => 1);
$data[] = array('volume' => 85, 'edition' => 6);
$data[] = array('volume' => 98, 'edition' => 2);
$data[] = array('volume' => 86, 'edition' => 6);
$data[] = array('volume' => 67, 'edition' => 7);

// Pass the array, followed by the column names and sort flags
$sorted = array_order_by($data, 'volume', SORT_DESC, 'edition', SORT_ASC);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

2191d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v1.3.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2862074?v=4)[Yury Bykov](/maintainers/yurybykov)[@yurybykov](https://github.com/yurybykov)

---

Tags

phparrayorder

### Embed Badge

![Health badge](/badges/yurybykov-array-order-by/health.svg)

```
[![Health](https://phpackages.com/badges/yurybykov-array-order-by/health.svg)](https://phpackages.com/packages/yurybykov-array-order-by)
```

###  Alternatives

[zakirullin/mess

Convenient array-related routine &amp; better type casting

21330.5k2](/packages/zakirullin-mess)

PHPackages © 2026

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