PHPackages                             amphp/parallel-functions - 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. amphp/parallel-functions

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

amphp/parallel-functions
========================

Parallel processing made simple.

v2.0.0(2y ago)27910.3M↓10.4%18[4 issues](https://github.com/amphp/parallel-functions/issues)20MITPHPPHP &gt;=8.1

Since Dec 14Pushed 2y ago11 watchersCompare

[ Source](https://github.com/amphp/parallel-functions)[ Packagist](https://packagist.org/packages/amphp/parallel-functions)[ GitHub Sponsors](https://github.com/amphp)[ RSS](/packages/amphp-parallel-functions/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (7)Dependencies (9)Versions (9)Used By (20)

parallel-functions
==================

[](#parallel-functions)

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. `amphp/parallel-functions` provides a utility function which wraps a callable into another callable which will execute on another process or thread. All data within the callable object or closure must be serializable.

See the `Worker` and `Task` interfaces in [`amphp/parallel`](https://github.com/amphp/parallel) for a more flexible and customizable API for running tasks in parallel.

[![Latest Release](https://camo.githubusercontent.com/a1064eeebe02dacc81932be3bf06097a14879e8eee36e128f240023ad3bb460a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f616d7068702f706172616c6c656c2d66756e6374696f6e732e7376673f7374796c653d666c61742d737175617265)](https://github.com/amphp/parallel-functions/releases)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)

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

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require amphp/parallel-functions
```

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

[](#requirements)

- PHP 8.1+

Example
-------

[](#example)

```
