PHP RFC: True Async

The TrueAsync project advances through the official RFC process on wiki.php.net. Two RFCs have been published describing the basic concurrency model and structured concurrency.

RFC #1 — PHP True Async

Author: Edmond [HT] Version: 1.7 Target version: PHP 8.6+ Under Discussion

The main RFC defining the concurrency model for PHP. Describes coroutines, functions spawn() / await() / suspend(), the Coroutine object, Awaitable and Completable interfaces, cooperative cancellation mechanism, Fiber integration, error handling and graceful shutdown.

Key principles:

Read RFC on wiki.php.net →

RFC #2 — Scope and Structured Concurrency

Author: Edmond [HT] Version: 1.0 Draft

An extension of the base RFC. Introduces the Scope class, binding coroutine lifetime to the lexical scope. Describes scope hierarchy, error propagation, “zombie” coroutine policy and critical sections via protect().

What it solves:

Read RFC on wiki.php.net →

How these RFCs relate

The first RFC defines low-level primitives — coroutines, base functions and C API for extensions. The second RFC adds structured concurrency — mechanisms for managing groups of coroutines that make concurrent code safe and predictable.

Together they form a complete asynchronous programming model for PHP:

  RFC #1: True Async RFC #2: Scope
Level Primitives Management
Provides spawn(), await(), Coroutine Scope, TaskGroup, protect()
Analogies Go goroutines, Kotlin coroutines Kotlin CoroutineScope, Python TaskGroup
Goal Running concurrent code Safe lifecycle management

Join the Discussion

RFCs are discussed on the internals@lists.php.net mailing list and on GitHub Discussions.

Also join the conversation on Discord.