finds.dev

nunomaduro/pokio

Pokio is a dead simple Asynchronous API for PHP that just works.

View on GitHubHomepage ↗

★ 764PHPMITupdated Jul 2026

// the take

Pokio adds async/await syntax to PHP by forking processes via PCNTL and using FFI-backed shared memory for IPC. It's a proof-of-concept from Nuno Maduro (Pest author) intended to power parallelism inside Pest, not a general-purpose concurrency library. The API is clean and familiar if you've written JavaScript async code.

The fallback to sequential execution when PCNTL/FFI aren't available is a smart safety net — your code doesn't break on Windows or restricted environments, it just runs slower. The IPC layer using FFI shared memory instead of pipes or temp files is a meaningful performance choice. Promise chaining with then/catch/finally is properly implemented, not bolted on. Coming from the Pest maintainer means the test coverage and code style are unusually disciplined for a small library.

The README opens with a caution block telling you not to use this in production — that's not a caveat, that's the whole story. FFI + PCNTL across forked processes means shared state, signal handling, and database connections all become your problem. There's no event loop, no I/O multiplexing, no way to await network operations without blocking a forked OS process per task — this is process-based parallelism dressed up as async, which breaks down quickly at scale. With 39 forks and no published roadmap for production use, adopting this outside of Pest internals is a gamble with no obvious upside over established alternatives like spatie/async.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
764
Forks
39
Language
PHP
License
MIT
Last commit
1 Jul 2026

// nearby

If pokio isn't quite it.

All repos →