Skip to content

Guide

Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.

In the guide section, you will learn how to use static php cli to build standalone PHP programs.

Compilation Environment

The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.

x86_64aarch64
macOS⚙️ 💻⚙️ 💻
Linux⚙️ 💻⚙️ 💻
Windows⚙️ 💻
FreeBSD💻💻

Current supported PHP versions for compilation:

⚠️ Partial support, there may be issues with new beta versions and old versions.

✔️ Supported

❌ Not supported

PHP VersionStatusComment
7.2
7.3phpmicro and many extensions do not support 7.3, 7.4 versions
7.4phpmicro and many extensions do not support 7.3, 7.4 versions
8.0⚠️PHP official has stopped maintaining 8.0, we no longer handle 8.0 related backport support
8.1⚠️PHP official only provides security updates for 8.1, we no longer handle 8.1 related backport support after 8.5 release
8.2✔️
8.3✔️
8.4✔️
8.5 (beta)⚠️PHP 8.5 is currently in beta stage

This table shows the support status of static-php-cli for building corresponding versions, not the PHP official support status for that version.

PHP Support Versions

Currently, static-php-cli supports PHP versions 8.2 ~ 8.5, and theoretically supports PHP 8.1 and earlier versions, just select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.

Released under the MIT License.