Note
ReactPHP is not the only async runtime compatible with Tyhp. Any PHP library that works with Fibers or provides an event loop can serve as the runtime backing for Tyhp's compiled async code.
ReactPHP is an event-driven, non-blocking I/O library for PHP. It is sometimes mentioned alongside Tyhp because both deal with asynchronous programming in PHP, but they operate at entirely different levels and solve different problems.
ReactPHP provides an event loop and asynchronous I/O primitives for PHP. It enables non-blocking network operations, timers, streams, HTTP servers, and more — all within standard PHP. ReactPHP is a runtime library distributed as a collection of Composer packages, not a language or compiler. It uses callbacks, Promises, and (in newer versions) integration with PHP Fibers to handle asynchronous operations.
Tyhp and ReactPHP solve async programming at different layers:
tyhp/async runtime (Fibers and a stream_select event loop inspired by libraries like ReactPHP).async/await does not require ReactPHP and does not emit ReactPHP loop calls by default.Tyhp and ReactPHP are complementary rather than competing technologies:
tyhp/async for typed Promise<T> without taking a ReactPHP dependency.ReactPHP is not the only async runtime compatible with Tyhp. Any PHP library that works with Fibers or provides an event loop can serve as the runtime backing for Tyhp's compiled async code.