CLI Build Command Generator | Static PHP

TIP

The extensions selected below may contain extensions that are not supported by the selected operating system, which may cause compilation to fail. Please check

Supported Extensions

first.

Select Build OS

LinuxmacOSWindows

Select Extensions

amqp

apcu

ast

bcmath

brotli

bz2

calendar

ctype

curl

dba

decimal

deepclone

dio

dom

ds

ev

event

excimer

exif

ffi

fileinfo

filter

ftp

gd

gettext

gmp

gmssl

grpc

iconv

igbinary

imagick

imap

inotify

intl

ldap

libxml

lz4

maxminddb

mbregex

mbstring

memcache

memcached

mongodb

msgpack

mysqli

mysqlnd

mysqlnd_ed25519

mysqlnd_parsec

odbc

opcache

openssl

opentelemetry

parallel

password-argon2

pcntl

pcov

pdo

pdo_mysql

pdo_odbc

pdo_pgsql

pdo_sqlite

pdo_sqlsrv

pgsql

phar

posix

protobuf

rar

rdkafka

readline

redis

session

shmop

simdjson

simplexml

snappy

snmp

soap

sockets

sodium

spx

sqlite3

sqlsrv

ssh2

swoole

swoole-hook-mysql

swoole-hook-odbc

swoole-hook-pgsql

swoole-hook-sqlite

swow

sysvmsg

sysvsem

sysvshm

tidy

tokenizer

trader

uuid

uv

xdebug

xhprof

xlswriter

xml

xmlreader

xmlwriter

xsl

xz

yac

yaml

zip

zlib

zstd

Select common extensions

Select all

Unselect all

Select DependenciesTIP

After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.

It is not possible to build all extensions at the same time, as some extensions conflict with each other. Please select the extensions you need.

Build Target

cli

fpm

micro

embed

frankenphp

all

Build Options

Build EnvironmentDownload PHP versionEnable debug messageYesNoEnable ZTSYesNoDownload with corresponding extension dependenciesYesNoDownload pre-built dependencies if possible (reduce compile time)YesNoEnable UPX compression (reduce binary size)YesNoHardcoded INI options

Result

Download spc binary command

curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64.tar.gz && tar -zxvf spc.tgz && rm spc.tgz

Download sources by extensions command

./spc download --with-php=8.4 --for-extensions "" --prefer-pre-built

Auto-check and prepare build environment command

./spc doctor --auto-fix

Compile command

./spc build --build-cli ""

craft.yml

php-version: 8.4 extensions: "" sapi: cli download-options: prefer-pre-built: true