PHPackages                             tleckie/collection - 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. tleckie/collection

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

tleckie/collection
==================

PHP Collection object

1.1.0(5y ago)012MITPHPPHP ^8

Since Apr 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/teodoroleckie/collection)[ Packagist](https://packagist.org/packages/tleckie/collection)[ Docs](https://github.com/teodoroleckie/collection)[ Fund](https://www.paypal.com/donate?business=ZHYA2MTGA4884&currency_code=USD)[ GitHub Sponsors](https://github.com/teodoroleckie)[ RSS](/packages/tleckie-collection/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Simple and powerful library for collections in PHP
==================================================

[](#simple-and-powerful-library-for-collections-in-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/09200a94c84690a5ed6167287f01393682800eb83643da0358f639d1672542a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746c65636b69652f636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tleckie/collection)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/58148f57858bff3fa20a0ef76bb7e50b9606475896d239184737439fc008443b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f636f6c6c656374696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/teodoroleckie/collection/?branch=main)[![Build Status](https://camo.githubusercontent.com/60027ed2feada5052c3cece1b706a7fea455028b77d291179ce86a95381832d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f636f6c6c656374696f6e2f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/teodoroleckie/collection/build-status/main)[![Total Downloads](https://camo.githubusercontent.com/dd78ca43d0d9da5604680085ad20d86733383bf690ad74f730c0f9ccea09080c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746c65636b69652f636f6c6c656374696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tleckie/collection)[![Code Intelligence Status](https://camo.githubusercontent.com/41f8bc375c43926e3033b437375f868ac847d85330306856c9d9093047d41555/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f636f6c6c656374696f6e2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d61696e)](https://scrutinizer-ci.com/code-intelligence)

### Installation

[](#installation)

You can install the package via composer:

```
composer require tleckie/collection
```

Usage
-----

[](#usage)

Hash
====

[](#hash)

Hash collections should be used when you need the keys to be strings.

```
