crazywhalecc / static-php-cli

static-php-cli is a powerful tool designed for building static, standalone PHP runtime with popular extensions.

Static PHP built by static-php-cli supports cli, fpm, embed and micro SAPI.

static-php-cli also has the ability to package PHP projects along with the PHP interpreter into one single executable file.

要 PHP 8 版以上

curl -o spc https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64
chmod +x ./spc
./spc --version
./bin/spc doctor --auto-fix
./spc download --with-php=8.3 --for-extensions "zlib"
./spc build --build-micro "zlib"

 

echo "<?php echo 'hello';" > hello.php
./spc micro:combine hello.php -O hello
./hello

 

Related posts 相關文章
WordPress 6.3 以後可能不支援 PHP 5,最低需求為 PHP 7.4
More...
你的 WordPress 升級到 PHP 8 了嗎
More...
你看 WordPress 也建議至少 PHP 7.4+ 了
More...
PHP 7 最後一版,今年也要退場了
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。