PHPackages                             parallite/parallite-php - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. parallite/parallite-php

ActiveLibrary[Queues &amp; Workers](/categories/queues)

parallite/parallite-php
=======================

Execute PHP closures in true parallel using pcntl\_fork — zero dependencies

v2.0.10(1mo ago)618721MITPHPPHP ^8.3CI passing

Since Oct 19Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/b7s/parallite-php)[ Packagist](https://packagist.org/packages/parallite/parallite-php)[ RSS](/packages/parallite-parallite-php/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (24)Versions (9)Used By (1)

[![Parallite Logo](docs/art/parallite-logo.webp)](docs/art/parallite-logo.webp)Parallite PHP
=============

[](#parallite-php)

[![Latest Version](https://camo.githubusercontent.com/561e7182bab93789e9d8c0c4873666eeee6d8bd50b4eb6da6f9f26994e80b418/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706172616c6c6974652f706172616c6c6974652d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parallite/parallite-php)[![PHP Version](https://camo.githubusercontent.com/b1199bc314ee4b1e50e0619b85de9e46e30f7fc1e2c910d7dd8455ed6de7ec43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706172616c6c6974652f706172616c6c6974652d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parallite/parallite-php)[![License](https://camo.githubusercontent.com/cda5fd1aca4bd5f9b79fc711b12937babd15639a735e9b30d70088b52a9733f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706172616c6c6974652f706172616c6c6974652d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parallite/parallite-php)

**Execute PHP closures in true parallel** — native `pcntl_fork` with zero dependencies, no daemon, no binary, no serialization.

---

Features
--------

[](#features)

- **True Parallel Execution** — `pcntl_fork` runs closures in separate processes simultaneously
- **Zero Dependencies** — only PHP 8.3+ with `ext-pcntl` and `ext-posix` (built-in)
- **No Daemon, No Binary** — no external process to install, start, or manage
- **No Closure Serialization** — forked processes inherit parent memory; closures run as-is
- **Simple async/await API** — familiar Promise-like interface with global helpers
- **Promise Chaining** — chainable `then()`, `catch()`, and `finally()` methods
- **Cross-platform** — fork mode on Linux/macOS, automatic sequential fallback on Windows
- **Benchmark Mode** — optional per-task metrics (execution time, memory, CPU)

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

[](#requirements)

- PHP 8.3+
- ext-pcntl (Linux/macOS — built-in, enables fork mode)
- ext-posix (Linux/macOS — built-in, enables fork mode)

> **Windows?** Parallite works on Windows in sequential fallback mode (no `pcntl_fork`). Parallel execution requires a Unix-like OS.

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

[](#installation)

```
composer require parallite/parallite-php
```

That's it. No binary to download, no daemon to start, no post-install scripts.

Quick Start
-----------

[](#quick-start)

```
