Compilers

Elephc

Write PHP. Ship a native binary.

A PHP-to-native compiler that turns a static subset of PHP into standalone binaries for macOS and Linux.

Status
Active
Primary stack
Rust
License
MIT
Latest release
v0.26.3
Released
August 5, 2026
GitHub stars
549
DOOM rendered by PHP compiled with Elephc

Why it exists

Made for the work, not the demo.

Elephc compiles PHP directly to native assembly without the Zend Engine, a VM, or an external PHP runtime. Ordinary source is ahead-of-time compiled into a single executable that can be copied and run on a supported target.

It is also a laboratory for how far a dynamic language can travel toward native deployment. Experimental eval support can embed an optional interpreter bridge, while showcases such as a non-blocking HTTP server and a DOOM renderer demonstrate what the compiler can already do.

Install with Homebrewterminal
brew install illegalstudio/tap/elephc