Build standalone, portable PHP binaries with popular extensions for Linux, macOS, Windows, and FreeBSD.
static-php-cli is a command-line tool that compiles PHP and its extensions into standalone, portable binaries. It solves the problem of deploying PHP applications without requiring a full PHP installation on the target system, enabling easy distribution across Linux, macOS, Windows, and FreeBSD. The tool supports over 100 extensions and can produce single-file executables with zero dependencies.
PHP developers and system administrators who need to deploy PHP applications in environments without a pre-installed PHP runtime, or who require portable, dependency-free PHP binaries for distribution.
Developers choose static-php-cli for its ability to create truly portable PHP binaries that include custom extensions, eliminating runtime dependencies and simplifying deployment. Its support for phpmicro to bundle code with the interpreter into a single executable offers a unique advantage for distributing CLI applications.
Build standalone portable PHP binaries on Linux, macOS, Windows, with PHP project together, with popular extensions included.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Builds static PHP binaries for Linux, macOS, FreeBSD, and Windows, enabling deployment across diverse environments without PHP installations.
Supports over 100 popular PHP extensions configurable via YAML, allowing tailored binaries for specific application needs, as listed in the documentation.
Produces zero-dependency executables and phpmicro self-extractors, simplifying distribution by eliminating external runtime dependencies.
Includes environment checking and auto-fix capabilities, reducing manual setup errors during compilation, as highlighted in the README.
Extensions are compiled statically and cannot be added or removed at runtime, requiring a full rebuild for any changes, which limits flexibility.
Requires crafting YAML files and managing dependencies, which can be time-consuming and error-prone for users unfamiliar with PHP build systems.
Even with UPX compression, binaries with many extensions are large (e.g., 25MB for bulk builds), and macOS lacks UPX support, leading to bigger files.