PHPackages                             yannoff/collections - 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. yannoff/collections

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

yannoff/collections
===================

A simple object implementation for PHP arrays

1.2.4(6mo ago)0492MITPHPCI passing

Since May 30Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/yannoff/collections)[ Packagist](https://packagist.org/packages/yannoff/collections)[ Docs](https://github.com/yannoff/collections)[ RSS](/packages/yannoff-collections/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)DependenciesVersions (15)Used By (0)

yannoff/collections
===================

[](#yannoffcollections)

A simple object implementation of PHP arrays.

[![Latest Stable Version](https://camo.githubusercontent.com/151e7a0731f3d0e6f5aee86456901e64627d12b4eaaee704a4bce5be5a96d746/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6c6c656374696f6e732f762f737461626c65)](https://packagist.org/packages/yannoff/collections)[![Total Downloads](https://camo.githubusercontent.com/130b6737c4f034c3e256d880c2a3e7f42bd6047b105c5a3577ba7c01efa69b78/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6c6c656374696f6e732f646f776e6c6f616473)](https://packagist.org/packages/yannoff/collections)[![License](https://camo.githubusercontent.com/9fa87bfacaa844442085babb2f32b42c825bd852aeb831c8ef0c6d35f9dcf62f/68747470733a2f2f706f7365722e707567782e6f72672f79616e6e6f66662f636f6c6c656374696f6e732f6c6963656e7365)](https://packagist.org/packages/yannoff/collections)

The concept
-----------

[](#the-concept)

Based upon the Decorator design pattern, the aim is to provide a flexible, object-oriented alternative to PHP Arrays.

Installation
------------

[](#installation)

Using [composer](https://getcomposer.org/):

```
$ composer require yannoff/collections
```

Usage
-----

[](#usage)

Example: PHP Array vs Collection

*The classic way - native PHP arrays:*

```
