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
=======================

Standalone PHP client for Parallite - Execute PHP closures in true parallel

v1.2.0(2mo ago)6162MITPHPPHP ^8.3CI passing

Since Oct 19Pushed 2mo 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 1mo ago

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

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

[](#parallite-php-client)

[![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** - A standalone PHP client for [Parallite](https://github.com/b7s/parallite), enabling real parallel execution of PHP code without the limitations of traditional PHP concurrency.

---

✨ Features
----------

[](#-features)

- 🚀 **True Parallel Execution** - Execute multiple PHP closures simultaneously
- 🎯 **Simple async/await API** - Familiar Promise-like interface
- 🔄 **Promise Chaining** - Chainable `then()`, `catch()`, and `finally()` methods
- 🌍 **Cross-platform** - Works on Windows, Linux and macOS
- ⏯️️ **Automatic Daemon Management** - Optional auto-start/stop of Parallite daemon
- ⚡ **Binary MessagePack Transport** - Ultra-fast daemon communication (2-5x faster than JSON)

📋 Requirements
--------------

[](#-requirements)

- PHP 8.3+
- ext-sockets
- ext-zip
- rybakit/msgpack
- opis/closure

> ⚠️ Important Notice:
>
> Passing closures that capture `$this` will cause opis/closure to serialize the entire object instance. This often includes non‑serializable dependencies (e.g., PDO, CurlHandle, resource, sockets, Laravel Models, Collections, etc) and may lead to errors.
>
> 👉 Please review the [Troubleshooting](docs/troubleshooting.md#serialization-failures) page for guidance on how to avoid this issue and know more.

📦 Installation
--------------

[](#-installation)

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

Add the install/update scripts to your `composer.json`:

```
{
  "scripts": {
    "post-install-cmd": [
      "@php vendor/parallite/parallite-php/bin/parallite-install"
    ],
    "post-update-cmd": [
      "@php vendor/parallite/parallite-php/bin/parallite-update"
    ]
  }
}
```

> See more about these scripts: [Installation Guide](docs/installation.md).

After adding the scripts, run (to download Parallite binary):

```
composer install

# or update
composer update
```

🚀 Quick Start
-------------

[](#-quick-start)

```
