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. 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. Scope::cancel().
Control coroutine lifetime with Scope sandbox. Manage groups of coroutines via TaskGroup.
Connection pooling built right into PDO. Automatic connection management for maximum performance.
Data exchange between coroutines. Buffered and unbuffered channels for producer/consumer patterns.
Deferred results for asynchronous computations. Composition via await_all, await_first.
Data associated with a coroutine. Easy adaptation of code with global variables via Context.
Get started with TrueAsync in minutes. Install via Composer and start writing concurrent code today.