PHPackages                             phower/arrays - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. phower/arrays

ActiveLibrary[Queues &amp; Workers](/categories/queues)

phower/arrays
=============

Array based classes to handle collections, stacks and queues in PHP.

1.0.0(10y ago)3431MITPHPPHP ^5.6 || ^7.0

Since May 15Pushed 10y ago3 watchersCompare

[ Source](https://github.com/phower/arrays)[ Packagist](https://packagist.org/packages/phower/arrays)[ Docs](https://github.com/phower/arrays)[ RSS](/packages/phower-arrays/feed)WikiDiscussions master Synced 2mo ago

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

Phower Arrayss
==============

[](#phower-arrayss)

Array based classes to handle collections, stacks and queues in PHP.

Requirements
------------

[](#requirements)

Phower Arrays requires:

- [PHP 5.6](http://php.net/releases/5_6_0.php) or above; version [7.0](http://php.net/releases/7_0_0.php) is recommended

Instalation
-----------

[](#instalation)

Add Phower Arrays to any PHP project using [Composer](https://getcomposer.org/):

```
composer require phower/arrays
```

Getting Started
---------------

[](#getting-started)

### Collections

[](#collections)

Collections is the base concept of this package. Each collection wraps an array into a class with methods to handle its elements in a normalized way. Both concrete and abstract classes are provided.

```
// index.php
require('path/to/vendor/autoload.php');

use Phower\Arrays\Collection;

$collection = new Collection();
```

Please review [Collection Interface](src/CollectionInterface.php) for more details on available methods.

### Stacks

[](#stacks)

Stacks are collections where elements are always added to the top of the internal array. This strategy allows a LIFO (Last In-First Out) handling.

```
use Phower\Arrays\Stack;

$stack = new Stack();
```

Please review [Stack Interface](src/StackInterface.php) for more details on available methods.

Queues
------

[](#queues)

Queues are collections with the ability to enqueue/dequeue elements. While enqueue is similiar to add method, dequeue always remove the returned element from the queue.

```
use Phower\Arrays\Queue;

$queue = new Queue();
```

Please review [Queue Interface](src/QueueInterface.php) for more details on available methods.

Running Tests
-------------

[](#running-tests)

Tests are available in a separated namespace and can run with [PHPUnit](http://phpunit.de/)in the command line:

```
vendor/bin/phpunit
```

Coding Standards
----------------

[](#coding-standards)

Phower code is written under [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style standard. To enforce that [CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) tools are also provided and can run as:

```
vendor/bin/phpcs
```

Reporting Issues
----------------

[](#reporting-issues)

In case you find issues with this code please open a ticket in Github Issues at .

Contributors
------------

[](#contributors)

Open Source is made of contribuition. If you want to contribute to Phower please follow these steps:

1. Fork latest version into your own repository.
2. Write your changes or additions and commit them.
3. Follow PSR-2 coding style standard.
4. Make sure you have unit tests with full coverage to your changes.
5. Go to Github Pull Requests at and create a new request.

Thank you!

Changes and Versioning
----------------------

[](#changes-and-versioning)

All relevant changes on this code are logged in a separated [log](CHANGELOG.md) file.

Version numbers follow recommendations from [Semantic Versioning](http://semver.org/).

License
-------

[](#license)

Phower code is maintained under [The MIT License](https://opensource.org/licenses/MIT).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

3652d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/04e91a806958f09ca8b3f4c24c6f5c4bcbce3c4e44dd882fa1e4c737ee7774c6?d=identicon)[pedrobrazao](/maintainers/pedrobrazao)

---

Tags

phparrayqueuestackcollection

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phower-arrays/health.svg)

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

###  Alternatives

[ramsey/collection

A PHP library for representing and manipulating collections.

1.2k486.0M69](/packages/ramsey-collection)[phootwork/collection

The phootwork library fills gaps in the php language and provides better solutions than the existing ones php offers.

3924.8M15](/packages/phootwork-collection)[microsoft/azure-storage-queue

This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Queue APIs.

142.6M17](/packages/microsoft-azure-storage-queue)[webparking/laravel-queue-ensurer

This composer package provides a Laravel queue ensurer.

6416.1k](/packages/webparking-laravel-queue-ensurer)

PHPackages © 2026

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