Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

PHP Runtime

The PHP runtime is the engine that executes PHP code. It includes the PHP core extensions, and the custom ones.

There is an official PHP runtime, provided by the PHP official website. It is maintained by the PHP Foundation. It is mostly written in C.

There are also custom runtimes, which take the PHP code as input, and execute it. They are built with other languages, and strive to execute as much as possible of PHP’s features, though they have to make trade-offs to fit specific features: for example, extension libraries are not always available.

  • PHP on Rust
  • PHP on Zig
  • PHP on Java, via Quercus
  • PHP on Wasm

These projects are complete rewrites of PHP with another technology. This is distinct from embedding PHP, where an original PHP engine is incorporated in another language.

See Also