PHPackages                             wemash/hooray - 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. wemash/hooray

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

wemash/hooray
=============

Fall in love with arrays all over again

0.85.4(11y ago)018GPL-2.0PHPPHP &gt;=5.4.0

Since Apr 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/wemash/hooray)[ Packagist](https://packagist.org/packages/wemash/hooray)[ Docs](https://hooray.github.io)[ RSS](/packages/wemash-hooray/feed)WikiDiscussions master Synced 1mo ago

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

hooray!
=======

[](#hooray)

In the long, long ago there were just arrays, and functions to handle them. That was cool, but the functions were scattered all over the floor and their argument orders weren't all that orderly. Then [@sancho](https://github.com/sanchothefat) had a great idea! Take the functions, order their arguments a little better, and make them chainable.

Wrap, transform, realize
------------------------

[](#wrap-transform-realize)

Hooray is all about giving you the tools you need to work on arrays, in the form of transformations. The transformations are hung off a Hooray object, which you wrap around your array. When you are all done, just get your new array out the other end. Here is an example:

```
$> hooray([1, 2, 3])
   ->map(function(thing) { return thing + 1; })
   ->realize();
$> [2, 3 4]

```

Hooray accepts arrays, or just a list of arguments if that's all you've got, so put those brackets away:

```
$> hooray(1, 2, 3)
   ->realize();
$> [1, 2, 3]

```

Hooray also accepts other hooray objects, so don't worry about double wrapping:

```
$> hooray(hooray(1, 2, 3))
   ->realize();
$> [1, 2, 3]

```

Adding links to the chain
-------------------------

[](#adding-links-to-the-chain)

So, let's say you've been working with hooray, and so far it has solved all your problems. Now you come across a problem that would totally be solved if you could *Just. Invoke. A. Transform!* Well, sure, you can do that:

```
$> Chain::add(
     "reticulateTheSplines",
     function($data, $arg1, $arg2) {
        // Reticulate some splines right here...
        return ["RE", "TIC", "ULATED"];
     });
$> hooray(1, 2, 3)
   ->reticulateTheSplines($arg1, $arg2)
   ->realize();
$> ["RE", "TIC", "ULATED"]

```

As you can see, a call to `Chain::add` created a new link that can immediately be invoked from any instance of hooray. What's more, that link can accept arguments, and the actual array hooray is wrapping gets prepended to the argument list before invocation. The link is then free to return whatevs. It's expected that transformations added through `Chain::add` return an array though. If you want to return something other than an array, use `Chain::addTerminal`.

Using the library
-----------------

[](#using-the-library)

1. `git clone https://github.com/wemash/hooray`
2. `phing package`
3. `cp hooray.phar /var/www/wherever/you/want`

or.....

1. `composer require wemash/hooray`
2. `composer update`
3. `composer install`

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.8% 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 ~2 days

Total

3

Last Release

4060d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f62f860bc08f283406f4e8d511682bcde4d32b911829770414fd7e0cf532f463?d=identicon)[kpullen](/maintainers/kpullen)

---

Top Contributors

[![sirovenmitts](https://avatars.githubusercontent.com/u/166686?v=4)](https://github.com/sirovenmitts "sirovenmitts (17 commits)")[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (7 commits)")

---

Tags

utilitiesarrays

### Embed Badge

![Health badge](/badges/wemash-hooray/health.svg)

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

###  Alternatives

[ilya/belt

A handful of tools for PHP developers.

71020.8k1](/packages/ilya-belt)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[lodash-php/lodash-php

A port of Lodash to PHP

527719.0k5](/packages/lodash-php-lodash-php)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

883.0M29](/packages/kartik-v-yii2-helpers)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147245.6k6](/packages/longman-ip-tools)[minwork/array

Pack of advanced array functions specifically tailored for: associative (assoc) array, multidimensional array, array of objects and handling nested array elements

66256.1k5](/packages/minwork-array)

PHPackages © 2026

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