Today the extension requires the TrueAsync php-src fork because it depends on the native coroutine and udp_bind APIs from ext-async. Investigate and implement a path to run on stock upstream PHP 8.6+.
Goals
- Detect at build time whether the host PHP has the TrueAsync async API; fall back to a non-async I/O strategy when it doesn't.
- Provide a synchronous / fiber-based execution model on stock PHP — request handlers run on PHP
Fibers scheduled on an internal libuv loop owned by the extension.
- Preserve the public
HttpServer API surface so user code does not have to change.
- Document the feature/perf delta clearly: no shared-loop integration with user code, no
udp_bind (so HTTP/3 may be limited or unavailable on stock PHP), no deep coroutine integration with user-space libraries.
Open questions
- Can HTTP/3 work on stock PHP if the extension owns the UDP socket itself, bypassing the missing
udp_bind?
- How is the event loop driven from a stock PHP CLI script — a blocking
$server->start() that owns the thread, vs. an explicit $server->tick()?
- What's the minimum PHP version we can realistically target (8.1 for Fibers, 8.6 for current TrueAsync features)?
Acceptance
pecl install (or equivalent) on a vanilla PHP 8.x build produces a working extension.
Hello, World! quickstart from the README runs unchanged on stock PHP.
- Docs clearly state which features require the TrueAsync fork.
Today the extension requires the TrueAsync
php-srcfork because it depends on the native coroutine andudp_bindAPIs fromext-async. Investigate and implement a path to run on stock upstream PHP 8.6+.Goals
Fibers scheduled on an internal libuv loop owned by the extension.HttpServerAPI surface so user code does not have to change.udp_bind(so HTTP/3 may be limited or unavailable on stock PHP), no deep coroutine integration with user-space libraries.Open questions
udp_bind?$server->start()that owns the thread, vs. an explicit$server->tick()?Acceptance
pecl install(or equivalent) on a vanilla PHP 8.x build produces a working extension.Hello, World!quickstart from the README runs unchanged on stock PHP.