phasync
phasync is a PHP library for fiber-based concurrency with its own event loop, coroutines and services.
phasync project site · adapter: fiber-interop/phasync
composer require fiber-interop/phasync
Conformance and test status
| Conformance examples (of 25) | 25/25 |
|---|---|
| Adapter unit tests | 35 tests, 41 assertions, OK |
| CI | The conformance numbers come from the site's daily CI run (conformance.json, PHP 8.4.27, 2026-11-11) |
| Skipped | None in the conformance suite |
Differences
None known.
Beyond the contract
Fully conformant (25/25). phasync switches scope itself in phasync 2.0 (also for raw phasync::go() coroutines), a foreign fiber waits by driving EventLoop::tick() in place, and phasync::run() nests freely — a library may call it whenever it needs the loop, and inside a parent run it cooperates with that run's coroutines (a route for making an application fiber-aware gradually, also under PHP-FPM). Only the outermost run is unique; the adapter issues it when fiber\run() is entered from {main}.