A framework for writing PHP extensions in pure, safe Rust, enabling high-performance native modules.
PHPER is a framework that allows developers to write PHP extensions using the Rust programming language instead of C. It provides a safe, ergonomic interface to PHP's internal APIs, enabling the creation of high-performance native modules with Rust's memory safety guarantees. This approach reduces common vulnerabilities associated with traditional C extensions while maintaining compatibility with a wide range of PHP versions.
PHP developers and system engineers who need to create high-performance native extensions, particularly those looking to leverage Rust's safety and performance for PHP module development.
Developers choose PHPER because it modernizes PHP extension development by replacing error-prone C code with safe Rust, offering better performance, memory safety, and a more developer-friendly API while maintaining broad PHP version and platform compatibility.
The framework that allows us to write PHP extensions using pure and safe Rust whenever possible.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Rust's ownership model to prevent common vulnerabilities like buffer overflows, making extensions more secure than traditional C-based ones, as emphasized in the philosophy.
Supports PHP versions from 7.0 to 8.5, including both NTS and ZTS modes, and works with CLI and FPM SAPIs, ensuring wide applicability across many environments.
Provides a safe, ergonomic API that abstracts PHP's internal structures, simplifying extension development compared to raw C interfaces, as noted in the key features.
Used in real-world projects like Apache SkyWalking PHP Agent, demonstrating its stability and suitability for production, as shown in the projects list.
Explicitly unsupported on Windows, limiting its use for developers or deployments in Windows-centric environments, as indicated in the tested support table.
Requires Rust 1.85+, libclang 9.0+, and PHP 7.0+, adding dependency management overhead and setup complexity compared to pure PHP development.
As a Rust-based framework for PHP extensions, it has a smaller community and fewer pre-built resources than traditional C extension tools, which might slow down development.