PHPackages                             console-helpers/process-iterator - 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. [CLI &amp; Console](/categories/cli)
4. /
5. console-helpers/process-iterator

ActiveLibrary[CLI &amp; Console](/categories/cli)

console-helpers/process-iterator
================================

Sequential way to run Symfony Processes in parallel

v1.0.0(10y ago)010.9k1BSD 3-ClausePHPPHP &gt;=5.3.7

Since Mar 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/console-helpers/process-iterator)[ Packagist](https://packagist.org/packages/console-helpers/process-iterator)[ RSS](/packages/console-helpers-process-iterator/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

ProcessIterator
===============

[](#processiterator)

[![CI](https://github.com/console-helpers/process-iterator/actions/workflows/tests.yml/badge.svg)](https://github.com/console-helpers/process-iterator/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/1c58c0df118a9706e17802b869bc90278cc0d62f6ef2def1172221e93be95e72/68747470733a2f2f636f6465636f762e696f2f67682f636f6e736f6c652d68656c706572732f70726f636573732d6974657261746f722f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d38477270375259424f37)](https://codecov.io/gh/console-helpers/process-iterator)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/617a54f18a9fc322bafe178cf7e1faaf046ac99107ca22430cc9436a81645b1b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e736f6c652d68656c706572732f70726f636573732d6974657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/console-helpers/process-iterator/?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/47c267e3dfa5d9bf562d53c7a6421a2ecd812b29a1e4689281c11195c1a778f5/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736f6c652d68656c706572732f70726f636573732d6974657261746f722f762f737461626c65)](https://packagist.org/packages/console-helpers/process-iterator)[![Total Downloads](https://camo.githubusercontent.com/7047f7e45cefdf53e8a14f4026a6023350ce1b06f00bf9cafbed4b0a46cc8423/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736f6c652d68656c706572732f70726f636573732d6974657261746f722f646f776e6c6f616473)](https://packagist.org/packages/console-helpers/process-iterator)[![License](https://camo.githubusercontent.com/59859138b3535047a6a70ef28a66a687fc764d07c7c24f57e44411edf07a15f5/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736f6c652d68656c706572732f70726f636573732d6974657261746f722f6c6963656e7365)](https://packagist.org/packages/console-helpers/process-iterator)

ProcessIterator is a PHP class, that allows writing sequential code to handle processes, that run in parallel.

This is a modified version of the `FutureIterator` class from [Phabricator](http://phabricator.org/) project adapted to with with [Symfony Process](http://symfony.com/doc/current/components/process.html) component.

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

[](#installation)

- execute this command to add dependencies: `php composer.phar require console-helpers/process-iterator:dev-master`

Usage
-----

[](#usage)

**IMPORTANT:** Keys are preserved, but the order of elements is not. Iteration is done over the processes in the order they are executed, so the fastest process is the one you'll get first. This allows you to start doing followup processing as soon as possible.

```
