php-wasm is a WebAssembly-powered runtime that enables PHP to run entirely inside the browser or JavaScript environments without requiring a traditional server setup. It compiles PHP into WebAssembly and exposes it through JavaScript APIs, allowing developers to execute PHP scripts directly in web pages, service workers, or Node.js contexts.
...It provides a native extension that exposes Wasmer’s API to PHP, closely mirroring the standard WebAssembly C API for familiarity and ease of use. The runtime is designed to execute Wasm modules at near-native speeds while maintaining strong sandboxing guarantees to ensure safety and isolation. Developers can instantiate modules, call exported functions, and interact with memory and data structures from PHP code, enabling hybrid architectures that combine PHP with high-performance compiled languages. The project is particularly useful for extending PHP applications with performance-critical logic written in languages like Rust or C that compile to WebAssembly. ...