PHPackages                             phalanx/core - 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. phalanx/core

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

phalanx/core
============

Expression-based async coordination for PHP 8.4+

v0.2.0(1mo ago)01↑2900%9MITPHPPHP ^8.4

Since Mar 23Pushed 1mo agoCompare

[ Source](https://github.com/havy-tech/phalanx-core)[ Packagist](https://packagist.org/packages/phalanx/core)[ Docs](https://github.com/havy-tech/phalanx-core)[ RSS](/packages/phalanx-core/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (12)Versions (3)Used By (9)

 [![Phalanx](brand/logo.svg)](brand/logo.svg)

Phalanx Core - Async PHP
========================

[](#phalanx-core---async-php)

Phalanx is an async coordination library for PHP 8.4+. It replaces callbacks with typed tasks—named computations that carry their own identity, behavior, and lifecycle through a unified execution model built on ReactPHP.

[Substack write up](https://open.substack.com/pub/jhavenz/p/when-php-computations-have-names)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [How It Works](#how-it-works)
    - [Scope Hierarchy](#scope-hierarchy)
- [The Task System](#the-task-system)
    - [Two Ways to Define Tasks](#two-ways-to-define-tasks)
    - [Behavior via Interfaces](#behavior-via-interfaces)
- [Concurrency Primitives](#concurrency-primitives)
- [Lazy Sequences](#lazy-sequences)
- [Route Groups](#route-groups)
    - [Loading Routes](#loading-routes)
    - [Composing Route Groups](#composing-route-groups)
- [Command Groups](#command-groups)
    - [Running Commands](#running-commands)
- [Services](#services)
- [Cancellation &amp; Retry](#cancellation--retry)
- [Tracing](#tracing)
- [Deterministic Cleanup](#deterministic-cleanup)
- [Examples](#examples)

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

[](#installation)

```
composer require phalanx/core
```

Requires PHP 8.4+.

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

[](#quick-start)

```
