KPHP is a PHP compiler. It compiles a limited subset of PHP to a native binary running faster than PHP.

KPHP wouldn't compile just any random PHP code: It doesn't support features that can't be compiled, such as calling by name or mocks.

More detailed, KPHP translates PHP sources to C++ equivalent and then compiles/links the resulting C++ code.

KPHP doesn't support features, that break type system f(42); f("string"); f(new User); array(1, new User, function(){}); In PHP, you can mix types arbitrary and handle them at runtime.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners