Skip to content

Pedal to the Metal: Compiling PHP to Native Code

Avatar of Guillaume Loulier Guillaume Loulier

For nearly thirty years, writing PHP has meant writing for an interpreter. When that one Symfony endpoint that won't go faster becomes performance-critical, you reach for a C extension or a rewrite in Go or Rust and leave PHP behind.

Elephc does the opposite. Written in Rust, it compiles a static subset of PHP straight to native machine code: no Zend engine, no fallback interpreter. Your project stays in PHP, only the critical modules go through Elephc.

It's the same wall that stalled a recent generics RFC: monomorphization is free in Rust but too costly in a dynamic engine like PHP. As always, the interpreter is the constraint, not the language.

After a tour of the tool, I'll take you from an everyday example to a Doom-style demo, limitations included. You'll leave with a clear mental model of AOT compilation.

Delivered in English
Room:
Smile / Upsun

Thursday, November 26, 2026 at 10:30 AM – 11:05 AM