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
留言