Write PHP. Ship a native binary.
PHP to native · macOS · Linux · open source
Tools, experiments, and showcases around elephc, a compiler that turns a supported subset of PHP into native executables and libraries. Explore systems programming, build command-line tools, and bring PHP beyond the web.
Official website · Documentation · Releases
- Install elephc with elvm, then compile your first PHP program.
- Explore examples to see the language and compiler extensions in action.
- Read the compiler source to follow the path from PHP to native assembly.
The compiler is developed in illegalstudio/elephc. This organization brings together its tooling and experiments.
| Project | What you will find |
|---|---|
| elephc | The PHP-to-native compiler, language documentation, examples, and releases. |
| elvm | Install compiler versions side by side and pin a version per project. |
| DOOM | DOOM rendered in PHP and compiled to a native binary. A read-only mirror of the compiler's showcase. |
| Laravel | Work in progress exploring Laravel compilation with elephc. |
| Tempest | Work in progress exploring Tempest compilation with elephc. |
Explore the DOOM showcase for source, build instructions, and a walkthrough.
elephc is experimental and evolving. It compiles a supported subset of PHP, and the framework projects above are ongoing compatibility experiments.
Report compiler bugs and propose improvements in elephc issues. For compiler and DOOM showcase contributions, start with the contributing guide. For elvm, use its own issue tracker.
