Imagine PHP with coroutines, where familiar functions support concurrent I/O. Build high-performance concurrent applications with clean, readable code and minimal changes!
Lightweight coroutines for efficient concurrent execution. No colored async functions. Just do spawn() and go!
fread, fwrite, file_get_contents, ob_start, Curl, MySQL, PostgreSQL and other APIs out of the box. Regular PHP functions now work asynchronously without extra effort.
Support for the model: multiple requests — one PHP process.
Simple and flexible API for coroutine cancellation, covering various scenarios.
Control coroutine lifetime with Scope sandbox. Manage groups of coroutines via TaskGroup.
Connection pooling built right into PDO. Automatic connection management for maximum performance.
Type-safe data exchange between coroutines. Buffered and unbuffered channels for producer/consumer patterns.
Deferred results for asynchronous computations. Composition via awaitAll, awaitFirst and flexible result management.
Context propagation through the entire coroutine tree. Timeouts, deadlines and operation cancellation with automatic resource cleanup.
Get started with TrueAsync in minutes. Install via Composer and start writing concurrent code today.