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

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

kofan/deferred-collection
=========================

PHP collections with deferred operations and execution

1.0.0(8y ago)03MITPHPPHP ^7.1

Since Jul 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kofan/deferred-collection)[ Packagist](https://packagist.org/packages/kofan/deferred-collection)[ RSS](/packages/kofan-deferred-collection/feed)WikiDiscussions master Synced 2d ago

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

Deferred Collection - PHP collections with deferred data processing
===================================================================

[](#deferred-collection---php-collections-with-deferred-data-processing)

[![Minimum PHP Version](https://camo.githubusercontent.com/ea1981b82245d665d0a74d4f6afa46433325109dc8099e3b024a99f9cbc210ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e312d626c75652e737667)](https://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/c305f52bfbf5eb6303c0e01b8ab283aecbdec8e5cb5beb015f4bf48b22a09cdc/68747470733a2f2f706f7365722e707567782e6f72672f6b6f66616e2f64656665727265642d636f6c6c656374696f6e2f762f737461626c65)](https://packagist.org/packages/kofan/deferred-collection)[![Build Status](https://camo.githubusercontent.com/2cc1792d37fc4599771551ab18d7378e16edb974df7b65a59e17dc9f1f267064/68747470733a2f2f7472617669732d63692e6f72672f6b6f66616e2f64656665727265642d636f6c6c656374696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/kofan/deferred-collection)[![Coverage Status](https://camo.githubusercontent.com/c760acbdf2b1a036a9194738b7ff41794f9fc47c433267bce581a4dbd7b9ef9f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6b6f66616e2f64656665727265642d636f6c6c656374696f6e2f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/kofan/deferred-collection?branch=master)[![StyleCI](https://camo.githubusercontent.com/ec3f222dd1a136bf41230d56d36959ac65d603640d77011bea3456ed964fc0a1/68747470733a2f2f7374796c6563692e696f2f7265706f732f39353531353536332f736869656c643f7374796c653d666c6174266272616e63683d6d6173746572)](https://styleci.io/repos/95515563)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![composer.lock](https://camo.githubusercontent.com/2327d66dff0355d9bacdbca1888786c8b83b79e03f490202a77e165aa5e7eea5/68747470733a2f2f706f7365722e707567782e6f72672f6b6f66616e2f64656665727265642d636f6c6c656374696f6e2f636f6d706f7365726c6f636b)](https://packagist.org/packages/kofan/deferred-collection)

Introduction and motivation
---------------------------

[](#introduction-and-motivation)

The main purpose of this library is to defer execution of different operations on collection items until your application really needs it. It turns out that very often the reason of application poor performance is an execution of unneeded operations on the collection of items. Moreover, performing heavy operations on the whole collection at once is usually very inefficient and takes too much memory. So, for example, let's take a look at the code

```
