<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Force re-download the PHP source (e.g. when switching versions)</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Override a download URL</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --custom-url</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"php-src:https://downloads.php.net/~user/php-8.5.0alpha1.tar.xz"</span></span></code></pre></div><h2id="build-php"tabindex="-1">build:php <aclass="header-anchor"href="#build-php"aria-label="Permalink to “build:php”"></a></h2><p>Build PHP and extensions from source. Alias: <code>build</code>.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">extension</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options]</span></span></code></pre></div><p><code>extensions</code> (required): Comma-separated list of extensions to compile statically (e.g. <code>"bcmath,openssl,curl"</code>).</p><p>All <code>download</code> options are also available on <code>build:php</code> with the <code>--dl-</code> prefix (e.g. <code>--dl-with-php=8.3</code>, <code>--dl-parallel=4</code>). These are passed to the automatic downloader that runs before the build.</p><h3id="sapi-selection"tabindex="-1">SAPI Selection <aclass="header-anchor"href="#sapi-selection"aria-label="Permalink to “SAPI Selection”"></a></h3><p>These flags apply only to the combined <code>build:php</code> target. To build a specific SAPI in isolation, use its dedicated command (e.g. <code>spc build:php-cli</code>).</p><tabletabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--build-cli</code></td><td>Build the <code>cli</code> SAPI (<code>php</code> / <code>php.exe</code>)</td></tr><tr><td><code>--build-fpm</code></td><td>Build <code>php-fpm</code> (Linux and macOS only)</td></tr><tr><td><code>--build-cgi</code></td><td>Build <code>php-cgi</code></td></tr><tr><td><code>--build-micro</code></td><td>Build <code>micro.sfx</code></td></tr><tr><td><code>--build-embed</code></td><td>Build the embed static library (<code>libphp.a</code> / <code>php8embed.lib</code>)</td></tr><tr><td><code>--build-frankenphp</code></td><td>Build the FrankenPHP binary</td></tr></tbody></table><h3id="common-build-options"tabindex="-1">Common Build Options <aclass="header-anchor"href="#common-build-options"aria-label="Permalink to “Common Build Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--no-strip</code></td><td></td><td>Keep debug symbols; do not strip the binary</td></tr><tr><td><code>--with-upx-pack</code></td><td></td><td>Compress the output binary with UPX (install first with <code>spc install-pkg upx</code>; Linux and Windows only)</td></tr><tr><td><code>--disable-opcache-jit</code></td><td></td><td>Disable OPcache JIT</td></tr><tr><td><code>--with-config-file-path=<path></code></td><td></td><td>Directory where PHP looks for <code>php.ini</code> (default: <code>/usr/local/etc/php</code>)</td></tr><tr><td><code>--with-config-file-scan-dir=<path></code></td><td></td><td>Directory PHP scans for additional <code>.ini</code> files (default: <code>/usr/local/etc/php/conf.d</code>)</td><
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl,curl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-frankenphp</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable-zts</span></span></code></pre></div><h2id="build-php-cli-build-php-fpm-build-php-micro-build-php-embed-build-php-cgi-build-frankenphp"tabindex="-1">build:php-cli, build:php-fpm, build:php-micro, build:php-embed, build:php-cgi, build:frankenphp <aclass="header-anchor"href="#build-php-cli-build-php-fpm-build-php-micro-build-php-embed-build-php-cgi-build-frankenphp"aria-label="Permalink to “build:php-cli, build:php-fpm, build:php-micro, build:php-embed, build:php-cgi, build:frankenphp”"></a></h2><p>Dedicated single-target build commands. These accept the same options as <code>build:php</code> except the SAPI-selection flags (<code>--build-*</code>), which are implicit.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-cli</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl,curl"</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:frankenphp</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl,curl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable-zts</span></span></code></pre></div><h2id="build-libs"tabindex="-1">build:libs <aclass="header-anchor"href="#build-libs"aria-label="Permalink to “build:libs”"></a></h2><p>Build one or more library packages from source.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">librarie</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options]</span></span></code></pre></div><p><code>libraries</code> (required): Comma-separated list of library package names to build (e.g. <code>"openssl,curl,zlib"</code>).</p><p>All <code>download</code> options are available with the <code>--dl-</code> prefix.</p><h3id="options-1"tabindex="-1">Options <aclass="header-anchor"href="#options-1"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-suggests</code></td><td><code>-L</code>, <code>-E</code></td><td>Also resolve and install suggested packages</td></tr><tr><td><code>--with-packages=<list></code></td><td></td><td>Additional packages to install alongside the build, comma-separated</td></tr><tr><td><code>--no-download</code></td><td></td><td>Skip downloading artifacts (use existing cached files)</td></tr></tbody></table><h3id="examples-2"tabindex="-1">Examples <aclass="header-anchor"href="#examples-2"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build a single library</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Skip the download step</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> openssl</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-download</span></span></code></pre></div><h2id="craft"tabindex="-1">craft <aclass="header-anchor"href="#craft"aria-label="Permalink to “craft”"></a></h2><p>Read a <code>craft.yml</code> and run the full build pipeline automatically.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> craft</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [path/to/craft.yml]</span></span></code></pre></div><p>If no path is given, <code>craft.yml</code> in the current working directory is used. See <ahref="./../develop/craft-yml.html">craft.yml configuration</a> for the file format.</p><h2id="doctor"tabindex="-1">doctor <aclass="header-anchor"href="#doctor"aria-label="Permalink to “doctor”"></a></h2><p>Diagnose whether the current environment can compile PHP normally.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--auto-fix[=never]]</span></span></code></pre></div><tabletabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--auto-fix</code></td><td>Automatically fix detected issues using the system package manager</td></tr><tr><td><code>--auto-fix=never</code></td><td>Report issues but never attempt automatic fixes</td></tr></tbody></table><h2id="dev-shell"tabindex="-1">dev:shell <aclass="header-anchor"href="#dev-shell"aria-label="Permalink to “dev:shell”"></a></h2><p>Enter an interactive shell with StaticPHP's build environment pre-loaded (compiler wrappers, <code>buildroot/</code>, <code>pkgroot/</code> paths, etc. on <code>PATH</code>).</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev:shell</span></span></code></pre></div><p>Useful for compiling small programs against <code>libphp.a</code> (embed SAPI) or inspecting the build environment manually.</p><h2id="check-update"tabindex="-1">check-update <aclass="header-anchor"href="#check-update"aria-label="Permalink to “check-update”"></a></h2><p>Check whether newer versions are available for downloaded artifacts.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [artifact] [options]</span></span></code></pre></di
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Check without requiring a prior download</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"openssl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bare</span></span></code></pre></div><h2id="dump-extensions"tabindex="-1">dump-extensions <aclass="header-anchor"href="#dump-extensions"aria-label="Permalink to “dump-extensions”"></a></h2><p>Analyse a Composer project and output the list of PHP extensions it requires.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [path] [options]</span></span></code></pre></div><p><code>path</code> (optional): Path to the project root (default: <code>.</code>).</p><h3id="options-3"tabindex="-1">Options <aclass="header-anchor"href="#options-3"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--format=<fmt></code></td><td><code>-F</code></td><td>Output format (default: <code>default</code>)</td></tr><tr><td><code>--no-ext-output=<list></code></td><td><code>-N</code></td><td>When no extensions are found, output this default comma-separated list instead of exiting with failure</td></tr><tr><td><code>--no-dev</code></td><td></td><td>Exclude dev dependencies</td></tr><tr><td><code>--no-spc-filter</code></td><td><code>-S</code></td><td>Do not apply the SPC filter when determining required extensions</td></tr></tbody></table><h3id="examples-4"tabindex="-1">Examples <aclass="header-anchor"href="#examples-4"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Analyse the current directory</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Fall back to a default list when no extensions are found</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-ext-output=</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl"</span></span></code></pre></div><h2id="dump-license"tabindex="-1">dump-license <aclass="header-anchor"href="#dump-license"aria-label="Permalink to “dump-license”"></a></h2><p>Export open-source license files for artifacts.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [artifacts] [options]</span></span></code></pre></div><p><code>artifacts</code> (optional): Specific artifacts whose licenses should be dumped, comma-separated (e.g. <code>"php-src,openssl,curl"</code>).</p><h3id="options-4"tabindex="-1">Options <aclass="header-anchor"href="#options-4"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--for-extensions=<list></code></td><td><code>-e</code></td><td>Dump by extension names (automatically includes <code>php-src</code>), e.g. <code>"openssl,mbstring"</code></td></tr><tr><td><code>--for-libs=<list></code></td><td><code>-l</code></td><td>Dump by library names, e.g. <code>"openssl,zlib"</code></td></tr><tr><td><code>--for-packages=<list></code></td><td><code>-p</code></td><td>Dump by package names, e.g. <code>"php,libssl"</code></td></tr><tr><td><code>--dump-dir=<path></code></td><td><code>-d</code></td><td>Directory to write license files (default: <code>buildroot/license</code>)</td></tr><tr><td><code>--without-suggests</code></td><td></td><td>Do not include licenses for suggested packages</td></tr></tbody></table><h3id="examples-5"tabindex="-1">Examples <aclass="header-anchor"href="#examples-5"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Dump licenses for the extensions you compiled</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Write licenses to a custom directory</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dump-dir=/tmp/licenses</span></span></code></pre></div><h2id="extract"tabindex="-1">extract <aclass="header-anchor"href="#extract"aria-label="Permalink to “extract”"></a></h2><p>Extract downloaded artifacts to their target locations in the source tree.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [artifacts] [options]</span></span></code></pre></div><p><code>artifacts</code> (optional): Specific artifacts to extract, comma-separated (e.g. <code>"php-src,openssl,curl"</code>).</p><h3id="options-5"tabindex="-1">Options <aclass="header-anchor"href="#options-5"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--for-extensions=<list></code></td><td><code>-e</code></td><td>Extract artifacts needed by the given extensions, e.g. <code>"openssl,mbstring"</code></td></tr><tr><td><code>--for-libs=<list></code></td><td><code>-l</code></td><td>Extract artifacts needed by the given libraries, e.g. <code>"libcares,openssl"</code></td></tr><tr><td><code>--for-packages=<list></code></td><td></td><td>Extract artifacts needed by the given packages, e.g. <code>"php,libssl,libcurl"</code></td></tr><tr><td><code>--without-suggests</code></td><td></td><td>Skip suggested packages when using <code>--for-extensions</code></td></tr><tr><td><code>--source-only</code></td><td></td><td>Force extraction from source even if a pre-built binary is available</td></tr></tbody></table><h3id="examples-6"tabindex="-1">Examples <aclass="header-anchor"href="#examples-6"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extract artifacts for a set of extensions</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Force source extraction</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"bcmath,openssl"</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --source-only</span></span></code></pre></div><h2id="install-pkg"tabindex="-1">install-pkg <aclass="header-anchor"href="#install-pkg"aria-label="Permalink to “install-pkg”"></a></h2><p>Install additional helper packages (e.g. UPX, toolchains). Aliases: <code>i</code>, <code>install-package</code>.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install-pkg</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">packag</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options]</span></span></code></pre></div><p><code>package</code> (required): The name of the package to install.</p><p>All <code>download</code> options are available with the <code>--dl-</code> prefix.</p><h3id="examples-7"tabindex="-1">Examples <aclass="header-anchor"href="#examples-7"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Install the UPX compressor</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install-pkg</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> upx</span></span></code></pre></div><h2id="micro-combine"tabindex="-1">micro:combine <aclass="header-anchor"href="#micro-combine"aria-label="Permalink to “micro:combine”"></a></h2><p>Merge <code>micro.sfx</code> with a PHP or PHAR file to produce a standalone executable.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">fil</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options]</span></span></code></pre></div><p><code>file</code> (required): Path to the PHP or PHAR file to combine.</p><h3id="options-6"tabindex="-1">Options <aclass="header-anchor"href="#options-6"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-micro=<path></code></td><td><code>-M</code></td><td>Path to a custom <code>micro.sfx</code> (default: <code>buildroot/bin/micro.sfx</code>)</td></tr><tr><td><code>--with-ini-set=<k=v></code></td><td><code>-I</code></td><td>Inject an INI setting into the binary (repeatable)</td></tr><tr><td><code>--with-ini-file=<path></code></td><td><code>-N</code></td><td>Inject INI settings from a file</td></tr><tr><td><code>--output=<name></code></td><td><code>-O</code></td><td>Output file name (default: <code>my-app</code>)</td></tr></tbody></table><h3id="examples-8"tabindex="-1">Examples <aclass="header-anchor"href="#examples-8"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Combine a PHP script</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Full clean without prompting</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reset</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-pkgroot</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-download</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yes</span></span></code></pre></div><h2id="spc-config"tabindex="-1">spc-config <aclass="header-anchor"href="#spc-config"aria-label="Permalink to “spc-config”"></a></h2><p>Output compiler and linker flags needed to link your own program against the PHP embed static library.</p><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [extensions] [options]</span></span></code></pre></div><p><code>extensions</code> (optional): Comma-separated list of extensions to include.</p><h3id="options-8"tabindex="-1">Options <aclass="header-anchor"href="#options-8"aria-label="Permalink to “Options”"></a></h3><tabletabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-libs=<list></code></td><td></td><td>Additional libraries to include, comma-separated</td></tr><tr><td><code>--with-packages=<list></code></td><td><code>-p</code></td><td>Additional packages to include, comma-separated</td></tr><tr><td><code>--with-suggested-libs</code></td><td><code>-L</code></td><td>Include suggested libraries</td></tr><tr><td><code>--with-suggests</code></td><td></td><td>Include all suggested packages</td></tr><tr><td><code>--with-suggested-exts</code></td><td><code>-E</code></td><td>Include suggested extensions</td></tr><tr><td><code>--includes</code></td><td></td><td>Output only <code>-I</code> include paths (<code>CFLAGS</code>)</td></tr><tr><td><code>--libs</code></td><td></td><td>Output only <code>-L</code> and <code>-l</code> linker flags (<code>LDFLAGS</code> + <code>LIBS</code>)</td></tr><tr><td><code>--libs-only-deps</code></td><td></td><td>Output only <code>-l</code> dependency flags</td></tr><tr><td><code>--absolute-libs</code></td><td></td><td>Use absolute paths for library files</td></tr><tr><td><code>--no-php</code></td><td></td><td>Do not link against the PHP library</td></tr></tbody></table><h3id="examples-10"tabindex="-1">Examples <aclass="header-anchor"href="#examples-10"aria-label="Permalink to “Examples”"></a></h3><divclass="language-bash"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">bash</span><preclass="shiki shiki-themes github-light github-dark"style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;"tabindex="0"dir="ltr"><code><spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output full compiler + linker flags</span></span>