ReactPHP
ReactPHP is an event-driven, non-blocking I/O toolkit for PHP; react/async provides fiber-based async() and await().
ReactPHP project site · adapter: fiber-interop/react
composer require fiber-interop/react
Conformance and test status
| Conformance examples (of 25) | 25/25 |
|---|---|
| Adapter unit tests | 17 tests, 28 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
Probe scope-loop.php measures code that bypasses fiber-interop: with raw React\Async\await(), per-scope superglobals can show the previously active scope's values after a wait. Waiting through fiber\sleep() / fiber\await() is safe. In-place waits from a foreign fiber started inside a running loop callback throw LogicException because the loop cannot be re-entered.
Beyond the contract
Fully conformant (25/25). Scope follows tasks started with fiber\go(); coroutines started with React's async() don't inherit it. Documented ask from the adapter README: a resume hook in react/async (a callback run in the target fiber, or around $fiber->resume(), in SimpleFiber/await()), or routing await() through a suspension object that user-visible code returns from, as Revolt's Suspension::suspend() does. Re-entrant Loop::run() is the other gap.