PHP in.
Native binary out.

Manticore compiles PHP 8.5+ to standalone arm64 and x86_64 binaries through LLVM. No interpreter, no php.ini, no extension loader. The compiler is written in PHP and compiles itself to a byte-identical fixpoint.

manticore compile app.php -o app && ./app
Install Read the docs

Latest release v0.17.0

Same bytes as Zend

The Zend interpreter is the oracle. If php runs a program, the native binary prints the same output. Every plain-runnable test case is diffed against it.

Faster, smaller

CaseNativePHPSpeedup
fib0.13 s13.61 s104.7×
generator_yield0.03 s0.91 s30.3×
closures0.03 s0.79 s26.3×
array0.09 s1.00 s11.1×
json0.05 s0.25 s5.0×

Full table

More than PHP

Install

curl -fsSL https://raw.githubusercontent.com/manticorephp/compiler/main/install.sh | bash
export PATH="$HOME/.manticore/bin:$PATH"
manticore version

macOS and Linux (glibc and musl), arm64 and x86_64.