Star RestPHP
Already starred? Check a public GitHub username below. This is not a GitHub login; only the username is remembered on this browser.
Already starred? Check a public GitHub username below. This is not a GitHub login; only the username is remembered on this browser.
PHP runtime powered by Rust with a custom Zend SAPI bridge, boot-once callbacks, and one NTS worker per process.
JSON API endpoint · 1,000 concurrent connections · 64 vCPU AMD EPYC · medians of 5
Cold boot, warm cache, peak concurrency, tail latency — measured six ways against FrankenPHP, RoadRunner, Swoole, and Nginx+FPM at their defaults.
Process execution to first HTTP 200 response
Zend VM kept hot in RAM · Plaintext echo
Routing + dynamic json_encode serialization
99th percentile under continuous 50 concurrency
Resident Set Size (RSS) under 50k requests
CPU-intensive recursive algorithm in PHP
Directly embeds Zend Engine via raw C-ABI (extern "C"). Eliminates ~60ns cgo stack-switching overhead present in Go-based servers.
Rust compile-time ownership (RAII) manages host memory without a host garbage collector.
One dedicated worker thread hosts the current NTS PHP runtime. Scale with supervisor-managed processes.
Serve public/index.php with per-request teardown, or boot Laravel once through the restphp/octane adapter and Octane request sandboxes.
Shipped as a single static executable (restphp). No Nginx, PHP-FPM, or Caddy configuration required.
RestPHP embeds the Zend engine directly; a production extension compatibility matrix is in progress.
Install, build, and serve any PHP application in seconds:
# Just run restphp — auto-detects Laravel, public/index.php, or index.php!
restphp# Execute PHP code directly in-memory from terminal
restphp -e 'echo "PHP Version: " . PHP_VERSION . "\n";'How does RestPHP's architecture differ from Go and C++ alternatives?