Files
static-php-cli/en/guide/cli-reference.html
2026-05-11 05:18:54 +00:00

136 lines
85 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>CLI Reference | StaticPHP</title>
<meta name="description" content="A powerful tool designed for building portable executables including PHP, extensions, and more.">
<meta name="generator" content="VitePress v2.0.0-alpha.12">
<link rel="preload stylesheet" href="/assets/style.DtFsVR9B.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.DX50IQrw.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.sEDLXE0N.js">
<link rel="modulepreload" href="/assets/chunks/framework.C2AwuPrQ.js">
<link rel="modulepreload" href="/assets/en_guide_cli-reference.md.B6zUxFdM.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-1df9f90f><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0b0ada53></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0b0ada53>Skip to content</a><!--]--><!----><header class="VPNav" data-v-1df9f90f data-v-9f75dce3><div class="VPNavBar" data-v-9f75dce3 data-v-2a96a3d0><div class="wrapper" data-v-2a96a3d0><div class="container" data-v-2a96a3d0><div class="title" data-v-2a96a3d0><div class="VPNavBarTitle has-sidebar" data-v-2a96a3d0 data-v-1e38c6bc><a class="title" href="/en/" data-v-1e38c6bc><!--[--><!--]--><!--[--><img class="VPImage logo" src="/images/static-php_nobg.png" alt data-v-8426fc1a><!--]--><span data-v-1e38c6bc>StaticPHP</span><!--[--><!--]--></a></div></div><div class="content" data-v-2a96a3d0><div class="content-body" data-v-2a96a3d0><!--[--><!--]--><div class="VPNavBarSearch search" data-v-2a96a3d0><!--[--><!----><div id="docsearch"><button type="button" aria-label="Search" aria-keyshortcuts="/ control+k meta+k" class="DocSearch DocSearch-Button"><span class="DocSearch-Button-Container"><span class="vpi-search DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key"></kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-2a96a3d0 data-v-39714824><span id="main-nav-aria-label" class="visually-hidden" data-v-39714824> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/guide/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>Guide</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/develop/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>Develop</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/contributing/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>Contributing</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en/faq/" tabindex="0" data-v-39714824 data-v-e56f3d57><!--[--><span data-v-e56f3d57>FAQ</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-39714824 data-v-42cb505d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-42cb505d><span class="text" data-v-42cb505d><!----><span data-v-42cb505d>v3 (alpha)</span><span class="vpi-chevron-down text-icon" data-v-42cb505d></span></span></button><div class="menu" data-v-42cb505d><div class="VPMenu" data-v-42cb505d data-v-25a6cce8><div class="items" data-v-25a6cce8><!--[--><!--[--><div class="VPMenuLink" data-v-25a6cce8 data-v-cd834e02><a class="VPLink link" href="/en/" data-v-cd834e02><!--[--><span data-v-cd834e02>v3 (alpha)</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-25a6cce8 data-v-cd834e02><a class="VPLink link vp-external-link-icon" href="https://static-php.github.io/v2-docs/" target="_blank" rel="noreferrer" data-v-cd834e02><!--[--><span data-v-cd834e02>v2</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-2a96a3d0 data-v-88af2de4 data-v-42cb505d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-42cb505d><span class="text" data-v-42cb505d><span class="vpi-languages option-icon" data-v-42cb505d></span><!----><span class="vpi-chevron-down text-icon" data-v-42cb505d></span></span></button><div class="menu" data-v-42cb505d><div class="VPMenu" data-v-42cb505d data-v-25a6cce8><!----><!--[--><!--[--><div class="items" data-v-88af2de4><p class="title" data-v-88af2de4>English</p><!--[--><div class="VPMenuLink" data-v-88af2de4 data-v-cd834e02><a class="VPLink link" href="/zh/guide/cli-reference.html" data-v-cd834e02><!--[--><span data-v-cd834e02>简体中文</span><!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-2a96a3d0 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-2a96a3d0 data-v-0394ad82 data-v-d07f11e6><!--[--><a class="VPSocialLink no-icon" href="https://github.com/crazywhalecc/static-php-cli" aria-label="github" target="_blank" rel="me noopener" data-v-d07f11e6 data-v-591a6b30><span class="vpi-social-github"></span></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-2a96a3d0 data-v-bb2aa2f0 data-v-42cb505d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-42cb505d><span class="vpi-more-horizontal icon" data-v-42cb505d></span></button><div class="menu" data-v-42cb505d><div class="VPMenu" data-v-42cb505d data-v-25a6cce8><!----><!--[--><!--[--><div class="group translations" data-v-bb2aa2f0><p class="trans-title" data-v-bb2aa2f0>English</p><!--[--><div class="VPMenuLink" data-v-bb2aa2f0 data-v-cd834e02><a class="VPLink link" href="/zh/guide/cli-reference.html" data-v-cd834e02><!--[--><span data-v-cd834e02>简体中文</span><!--]--></a></div><!--]--></div><div class="group" data-v-bb2aa2f0><div class="item appearance" data-v-bb2aa2f0><p class="label" data-v-bb2aa2f0>Appearance</p><div class="appearance-action" data-v-bb2aa2f0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-bb2aa2f0 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div></div></div><div class="group" data-v-bb2aa2f0><div class="item social-links" data-v-bb2aa2f0><div class="VPSocialLinks social-links-list" data-v-bb2aa2f0 data-v-d07f11e6><!--[--><a class="VPSocialLink no-icon" href="https://github.com/crazywhalecc/static-php-cli" aria-label="github" target="_blank" rel="me noopener" data-v-d07f11e6 data-v-591a6b30><span class="vpi-social-github"></span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-2a96a3d0 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-2a96a3d0><div class="divider-line" data-v-2a96a3d0></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-1df9f90f data-v-8acdfeb5><div class="container" data-v-8acdfeb5><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-8acdfeb5><span class="vpi-align-left menu-icon" data-v-8acdfeb5></span><span class="menu-text" data-v-8acdfeb5>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-8acdfeb5 data-v-0bf0e06f><button data-v-0bf0e06f>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-1df9f90f data-v-e7c6e512><div class="curtain" data-v-e7c6e512></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-e7c6e512><span class="visually-hidden" id="sidebar-aria-label" data-v-e7c6e512> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-8d50c081><section class="VPSidebarItem level-0 has-active" data-v-8d50c081 data-v-d81de50c><div class="item" role="button" tabindex="0" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><h2 class="text" data-v-d81de50c>Getting Started</h2><!----></div><div class="items" data-v-d81de50c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/installation.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Installation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/first-build.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>First Build</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/sapi-reference.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>PHP SAPI Reference</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/cli-reference.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>CLI Reference</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/migrate-from-v2.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Migrating from v2</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-8d50c081><section class="VPSidebarItem level-0" data-v-8d50c081 data-v-d81de50c><div class="item" role="button" tabindex="0" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><h2 class="text" data-v-d81de50c>Extensions</h2><!----></div><div class="items" data-v-d81de50c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/extensions.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Supported Extensions</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/extension-notes.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Extension Notes</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/cli-generator.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Build Command Generator</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-8d50c081><section class="VPSidebarItem level-0" data-v-8d50c081 data-v-d81de50c><div class="item" role="button" tabindex="0" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><h2 class="text" data-v-d81de50c>Reference</h2><!----></div><div class="items" data-v-d81de50c><!--[--><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/env-vars.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Environment Variables</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/deps-map.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Dependency Table</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-d81de50c data-v-d81de50c><div class="item" data-v-d81de50c><div class="indicator" data-v-d81de50c></div><a class="VPLink link link" href="/en/guide/troubleshooting.html" data-v-d81de50c><!--[--><p class="text" data-v-d81de50c>Troubleshooting</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-1df9f90f data-v-aff0b8d7><div class="VPDoc has-sidebar has-aside" data-v-aff0b8d7 data-v-7011f0d8><!--[--><!--]--><div class="container" data-v-7011f0d8><div class="aside" data-v-7011f0d8><div class="aside-curtain" data-v-7011f0d8></div><div class="aside-container" data-v-7011f0d8><div class="aside-content" data-v-7011f0d8><div class="VPDocAside" data-v-7011f0d8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-60d5052e><div class="content" data-v-60d5052e><div class="outline-marker" data-v-60d5052e></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-60d5052e>On this page</div><ul class="VPDocOutlineItem root" data-v-60d5052e data-v-2d0bdf9b><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-7011f0d8><div class="content-container" data-v-7011f0d8><!--[--><!--]--><main class="main" data-v-7011f0d8><div style="position:relative;" class="vp-doc _en_guide_cli-reference external-link-icon-enabled" data-v-7011f0d8><div><h1 id="cli-reference" tabindex="-1">CLI Reference <a class="header-anchor" href="#cli-reference" aria-label="Permalink to “CLI Reference”"></a></h1><div class="tip custom-block"><p class="custom-block-title custom-block-title-default">TIP</p><p>If you installed spc as a pre-built binary, replace every <code>spc</code> in this page with <code>./spc</code> (or <code>.\spc.exe</code> on Windows).</p><p>If you installed from source, use <code>bin/spc</code> instead.</p></div><h2 id="download" tabindex="-1">download <a class="header-anchor" href="#download" aria-label="Permalink to “download”"></a></h2><p>Download source archives and pre-built binaries required for building.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [artifacts] [options]</span></span></code></pre></div><p><code>artifacts</code> (optional): Specific artifacts to download, comma-separated (e.g. <code>&quot;php-src,openssl,curl&quot;</code>).</p><h3 id="options" tabindex="-1">Options <a class="header-anchor" href="#options" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--for-extensions=&lt;list&gt;</code></td><td><code>-e</code></td><td>Download artifacts needed by the given extensions</td></tr><tr><td><code>--for-libs=&lt;list&gt;</code></td><td><code>-l</code></td><td>Download artifacts needed by the given libraries</td></tr><tr><td><code>--for-packages=&lt;list&gt;</code></td><td></td><td>Download artifacts needed by the given packages</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>--clean</code></td><td></td><td>Delete existing download cache before fetching</td></tr><tr><td><code>--with-php=&lt;ver&gt;</code></td><td></td><td>PHP version in <code>major.minor</code> format (default: <code>8.5</code>)</td></tr><tr><td><code>--prefer-binary</code></td><td><code>-p</code></td><td>Prefer pre-built binaries over source archives</td></tr><tr><td><code>--prefer-source</code></td><td></td><td>Prefer source archives over pre-built binaries</td></tr><tr><td><code>--source-only</code></td><td></td><td>Only download source artifacts</td></tr><tr><td><code>--binary-only</code></td><td></td><td>Only download binary artifacts</td></tr><tr><td><code>--parallel=&lt;n&gt;</code></td><td><code>-P</code></td><td>Number of parallel downloads (default: <code>1</code>)</td></tr><tr><td><code>--retry=&lt;n&gt;</code></td><td><code>-R</code></td><td>Number of retries on failure (default: <code>0</code>)</td></tr><tr><td><code>--ignore-cache=&lt;list&gt;</code></td><td><code>-i</code></td><td>Force re-download the specified artifacts</td></tr><tr><td><code>--no-alt</code></td><td></td><td>Do not use alternative mirror URLs</td></tr><tr><td><code>--no-shallow-clone</code></td><td></td><td>Do not clone git repositories shallowly</td></tr><tr><td><code>--custom-url=&lt;src:url&gt;</code></td><td><code>-U</code></td><td>Override the download URL for a source</td></tr><tr><td><code>--custom-git=&lt;src:branch:url&gt;</code></td><td><code>-G</code></td><td>Override with a custom git repository</td></tr><tr><td><code>--custom-local=&lt;src:path&gt;</code></td><td><code>-L</code></td><td>Use a local path as a source override</td></tr></tbody></table><h3 id="examples" tabindex="-1">Examples <a class="header-anchor" href="#examples" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download only what the chosen extensions need</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-php=8.5</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download specific artifacts</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;php-src,openssl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Speed up with parallelism and retries</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --parallel</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 8</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --retry=3</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Prefer pre-built binaries</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prefer-binary</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Force re-download the PHP source (e.g. when switching versions)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --ignore-cache=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;php-src&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-php=8.3</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Override a download URL</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --custom-url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;php-src:https://downloads.php.net/~user/php-8.5.0alpha1.tar.xz&quot;</span></span></code></pre></div><h2 id="build-php" tabindex="-1">build:php <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">extension</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--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>&quot;bcmath,openssl,curl&quot;</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><h3 id="sapi-selection" tabindex="-1">SAPI Selection <a class="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><table tabindex="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><h3 id="common-build-options" tabindex="-1">Common Build Options <a class="header-anchor" href="#common-build-options" aria-label="Permalink to “Common Build Options”"></a></h3><table tabindex="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=&lt;path&gt;</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=&lt;path&gt;</code></td><td></td><td>Directory PHP scans for additional <code>.ini</code> files (default: <code>/usr/local/etc/php/conf.d</code>)</td></tr><tr><td><code>--with-hardcoded-ini=&lt;k=v&gt;</code></td><td><code>-I</code></td><td>Bake an INI setting into the binary at compile time (repeatable)</td></tr><tr><td><code>--enable-zts</code></td><td></td><td>Enable thread-safe (ZTS) mode</td></tr><tr><td><code>--no-smoke-test</code></td><td></td><td>Skip the post-build smoke tests</td></tr><tr><td><code>--with-suggests</code></td><td></td><td>Also resolve and install suggested packages</td></tr><tr><td><code>--with-packages=&lt;list&gt;</code></td><td></td><td>Additional packages to install alongside the build</td></tr><tr><td><code>--no-download</code></td><td></td><td>Skip the download step (use existing cached files)</td></tr><tr><td><code>--build-shared=&lt;list&gt;</code></td><td><code>-D</code></td><td>Extensions to compile as shared <code>.so</code> / <code>.dll</code> instead of static</td></tr></tbody></table><h3 id="micro-options" tabindex="-1">micro Options <a class="header-anchor" href="#micro-options" aria-label="Permalink to “micro Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-micro-fake-cli</code></td><td>Make <code>micro</code>&#39;s <code>PHP_SAPI</code> report <code>cli</code> instead of <code>micro</code></td></tr><tr><td><code>--without-micro-ext-test</code></td><td>Disable the post-build extension test for <code>micro.sfx</code></td></tr><tr><td><code>--with-micro-logo=&lt;path&gt;</code></td><td>Embed a custom <code>.ico</code> icon into <code>micro.sfx</code> (Windows only)</td></tr><tr><td><code>--enable-micro-win32</code></td><td>Build <code>micro.sfx</code> as a Win32 GUI application instead of a console app (Windows only)</td></tr></tbody></table><h3 id="frankenphp-options" tabindex="-1">frankenphp Options <a class="header-anchor" href="#frankenphp-options" aria-label="Permalink to “frankenphp Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--enable-zts</code></td><td>Required for FrankenPHP; enables thread-safe mode</td></tr><tr><td><code>--with-frankenphp-app=&lt;path&gt;</code></td><td>Embed a directory into the FrankenPHP binary</td></tr></tbody></table><h3 id="embed-options" tabindex="-1">embed Options <a class="header-anchor" href="#embed-options" aria-label="Permalink to “embed Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--build-shared=&lt;list&gt;</code></td><td>Compile specific extensions as shared libraries (requires embed SAPI)</td></tr><tr><td><code>--maintainer-skip-build</code></td><td>(maintainer only) Skip the PHP embed build if <code>libphp.a</code> / <code>libphp.so</code> already exists in buildroot</td></tr></tbody></table><h3 id="download-options" tabindex="-1">Download Pass-through Options <a class="header-anchor" href="#download-options" aria-label="Permalink to “Download Pass-through Options”"></a></h3><p>All downloader options are available with the <code>--dl-</code> prefix:</p><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>--dl-with-php=&lt;ver&gt;</code></td><td>PHP version to download (default: <code>8.5</code>)</td></tr><tr><td><code>--dl-prefer-binary</code></td><td>Prefer pre-built binaries for dependencies</td></tr><tr><td><code>--dl-parallel=&lt;n&gt;</code></td><td>Number of parallel downloads</td></tr><tr><td><code>--dl-retry=&lt;n&gt;</code></td><td>Number of retries on failure</td></tr><tr><td><code>--dl-custom-url=&lt;src:url&gt;</code></td><td>Override a source download URL</td></tr><tr><td><code>--dl-custom-git=&lt;src:branch:url&gt;</code></td><td>Override with a custom git repository</td></tr></tbody></table><p>Downloader options passed to <code>build:php</code> are used by the automatic downloader that runs before the build. This allows you to control the download behavior without needing a separate <code>spc download</code> command.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dl-with-php=8.3</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dl-prefer-binary</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dl-parallel=4</span></span></code></pre></div><h3 id="examples-1" tabindex="-1">Examples <a class="header-anchor" href="#examples-1" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build cli SAPI</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build cli + micro together</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,phar,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-micro</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build with a specific PHP version</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dl-with-php=8.3</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Bake INI into the binary</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,pcntl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -I</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;memory_limit=4G&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -I</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;disable_functions=system&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Keep debug symbols</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-strip</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build FrankenPHP (ZTS required)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-frankenphp</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable-zts</span></span></code></pre></div><h2 id="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 <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-cli</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-micro</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,phar,openssl&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-fpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl,pdo_mysql&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php-embed</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:frankenphp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable-zts</span></span></code></pre></div><h2 id="build-libs" tabindex="-1">build:libs <a class="header-anchor" href="#build-libs" aria-label="Permalink to “build:libs”"></a></h2><p>Build one or more library packages from source.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">librarie</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">s</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--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>&quot;openssl,curl,zlib&quot;</code>).</p><p>All <code>download</code> options are available with the <code>--dl-</code> prefix.</p><h3 id="options-1" tabindex="-1">Options <a class="header-anchor" href="#options-1" aria-label="Permalink to “Options”"></a></h3><table tabindex="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=&lt;list&gt;</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><h3 id="examples-2" tabindex="-1">Examples <a class="header-anchor" href="#examples-2" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build a single library</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> openssl</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build multiple libraries</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;openssl,curl,zlib&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build with suggested packages included</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-suggests</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Skip the download step</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:libs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> openssl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-download</span></span></code></pre></div><h2 id="craft" tabindex="-1">craft <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> craft</span><span style="--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 <a href="./../develop/craft-yml.html">craft.yml configuration</a> for the file format.</p><h2 id="doctor" tabindex="-1">doctor <a class="header-anchor" href="#doctor" aria-label="Permalink to “doctor”"></a></h2><p>Diagnose whether the current environment can compile PHP normally.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> doctor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--auto-fix[=never]]</span></span></code></pre></div><table tabindex="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><h2 id="dev-shell" tabindex="-1">dev:shell <a class="header-anchor" href="#dev-shell" aria-label="Permalink to “dev:shell”"></a></h2><p>Enter an interactive shell with StaticPHP&#39;s build environment pre-loaded (compiler wrappers, <code>buildroot/</code>, <code>pkgroot/</code> paths, etc. on <code>PATH</code>).</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--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><h2 id="check-update" tabindex="-1">check-update <a class="header-anchor" href="#check-update" aria-label="Permalink to “check-update”"></a></h2><p>Check whether newer versions are available for downloaded artifacts.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [artifact] [options]</span></span></code></pre></div><p><code>artifact</code> (optional): Artifact names to check, comma-separated. Defaults to all currently downloaded artifacts.</p><h3 id="options-2" tabindex="-1">Options <a class="header-anchor" href="#options-2" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--json</code></td><td></td><td>Output results in JSON format</td></tr><tr><td><code>--bare</code></td><td></td><td>Check without requiring the artifact to be downloaded first (old version will be <code>null</code>)</td></tr><tr><td><code>--parallel=&lt;n&gt;</code></td><td><code>-p</code></td><td>Number of parallel update checks (default: <code>10</code>)</td></tr><tr><td><code>--with-php=&lt;ver&gt;</code></td><td></td><td>PHP version context in <code>major.minor</code> format (default: <code>8.5</code>)</td></tr></tbody></table><h3 id="examples-3" tabindex="-1">Examples <a class="header-anchor" href="#examples-3" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Check all downloaded artifacts</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Check specific artifacts</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;openssl,curl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output as JSON</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Check without requiring a prior download</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> check-update</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --bare</span></span></code></pre></div><h2 id="dump-extensions" tabindex="-1">dump-extensions <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--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><h3 id="options-3" tabindex="-1">Options <a class="header-anchor" href="#options-3" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--format=&lt;fmt&gt;</code></td><td><code>-F</code></td><td>Output format (default: <code>default</code>)</td></tr><tr><td><code>--no-ext-output=&lt;list&gt;</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><h3 id="examples-4" tabindex="-1">Examples <a class="header-anchor" href="#examples-4" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Analyse the current directory</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Analyse a specific directory</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /path/to/project</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Exclude dev dependencies</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-dev</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Fall back to a default list when no extensions are found</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-extensions</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-ext-output=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl&quot;</span></span></code></pre></div><h2 id="dump-license" tabindex="-1">dump-license <a class="header-anchor" href="#dump-license" aria-label="Permalink to “dump-license”"></a></h2><p>Export open-source license files for artifacts.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><span style="--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>&quot;php-src,openssl,curl&quot;</code>).</p><h3 id="options-4" tabindex="-1">Options <a class="header-anchor" href="#options-4" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--for-extensions=&lt;list&gt;</code></td><td><code>-e</code></td><td>Dump by extension names (automatically includes <code>php-src</code>), e.g. <code>&quot;openssl,mbstring&quot;</code></td></tr><tr><td><code>--for-libs=&lt;list&gt;</code></td><td><code>-l</code></td><td>Dump by library names, e.g. <code>&quot;openssl,zlib&quot;</code></td></tr><tr><td><code>--for-packages=&lt;list&gt;</code></td><td><code>-p</code></td><td>Dump by package names, e.g. <code>&quot;php,libssl&quot;</code></td></tr><tr><td><code>--dump-dir=&lt;path&gt;</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><h3 id="examples-5" tabindex="-1">Examples <a class="header-anchor" href="#examples-5" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Dump licenses for the extensions you compiled</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl,curl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Dump licenses for specific artifacts</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;php-src,openssl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Write licenses to a custom directory</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dump-license</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dump-dir=/tmp/licenses</span></span></code></pre></div><h2 id="extract" tabindex="-1">extract <a class="header-anchor" href="#extract" aria-label="Permalink to “extract”"></a></h2><p>Extract downloaded artifacts to their target locations in the source tree.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--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>&quot;php-src,openssl,curl&quot;</code>).</p><h3 id="options-5" tabindex="-1">Options <a class="header-anchor" href="#options-5" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--for-extensions=&lt;list&gt;</code></td><td><code>-e</code></td><td>Extract artifacts needed by the given extensions, e.g. <code>&quot;openssl,mbstring&quot;</code></td></tr><tr><td><code>--for-libs=&lt;list&gt;</code></td><td><code>-l</code></td><td>Extract artifacts needed by the given libraries, e.g. <code>&quot;libcares,openssl&quot;</code></td></tr><tr><td><code>--for-packages=&lt;list&gt;</code></td><td></td><td>Extract artifacts needed by the given packages, e.g. <code>&quot;php,libssl,libcurl&quot;</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><h3 id="examples-6" tabindex="-1">Examples <a class="header-anchor" href="#examples-6" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extract artifacts for a set of extensions</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl,curl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extract specific artifacts</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;php-src,openssl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Force source extraction</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> extract</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --for-extensions=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --source-only</span></span></code></pre></div><h2 id="install-pkg" tabindex="-1">install-pkg <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install-pkg</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">packag</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--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><h3 id="examples-7" tabindex="-1">Examples <a class="header-anchor" href="#examples-7" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Install the UPX compressor</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install-pkg</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> upx</span></span></code></pre></div><h2 id="micro-combine" tabindex="-1">micro:combine <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">fil</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--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><h3 id="options-6" tabindex="-1">Options <a class="header-anchor" href="#options-6" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-micro=&lt;path&gt;</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=&lt;k=v&gt;</code></td><td><code>-I</code></td><td>Inject an INI setting into the binary (repeatable)</td></tr><tr><td><code>--with-ini-file=&lt;path&gt;</code></td><td><code>-N</code></td><td>Inject INI settings from a file</td></tr><tr><td><code>--output=&lt;name&gt;</code></td><td><code>-O</code></td><td>Output file name (default: <code>my-app</code>)</td></tr></tbody></table><h3 id="examples-8" tabindex="-1">Examples <a class="header-anchor" href="#examples-8" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Combine a PHP script</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app.php</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Combine a PHAR with a custom output name</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app.phar</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --output</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-app</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Inject INI settings</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -I</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;memory_limit=512M&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -I</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;disable_functions=system&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Inject from an INI file</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-ini-file=custom.ini</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Use a custom micro.sfx</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> app.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-micro=/path/to/micro.sfx</span></span></code></pre></div><h2 id="reset" tabindex="-1">reset <a class="header-anchor" href="#reset" aria-label="Permalink to “reset”"></a></h2><p>Clean build directories and reset the build environment.</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reset</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [options]</span></span></code></pre></div><p>By default, removes <code>buildroot/</code> and <code>source/</code>.</p><h3 id="options-7" tabindex="-1">Options <a class="header-anchor" href="#options-7" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-pkgroot</code></td><td></td><td>Also remove the <code>pkgroot/</code> directory</td></tr><tr><td><code>--with-download</code></td><td></td><td>Also remove the <code>downloads/</code> directory</td></tr><tr><td><code>--yes</code></td><td><code>-y</code></td><td>Skip the confirmation prompt</td></tr></tbody></table><h3 id="examples-9" tabindex="-1">Examples <a class="header-anchor" href="#examples-9" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Clean build directories (will prompt for confirmation)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reset</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Also clear the download cache</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reset</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-download</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Full clean without prompting</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reset</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-pkgroot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --with-download</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --yes</span></span></code></pre></div><h2 id="spc-config" tabindex="-1">spc-config <a class="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><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--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><h3 id="options-8" tabindex="-1">Options <a class="header-anchor" href="#options-8" aria-label="Permalink to “Options”"></a></h3><table tabindex="0"><thead><tr><th>Option</th><th>Short</th><th>Description</th></tr></thead><tbody><tr><td><code>--with-libs=&lt;list&gt;</code></td><td></td><td>Additional libraries to include, comma-separated</td></tr><tr><td><code>--with-packages=&lt;list&gt;</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><h3 id="examples-10" tabindex="-1">Examples <a class="header-anchor" href="#examples-10" aria-label="Permalink to “Examples”"></a></h3><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="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><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output full compiler + linker flags</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,curl&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output include paths only</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --includes</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Output linker flags only</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --libs</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Use absolute library paths</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> spc-config</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --libs</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --absolute-libs</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-7011f0d8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/en/guide/sapi-reference.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>PHP SAPI Reference</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/en/guide/migrate-from-v2.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>Migrating from v2</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-1df9f90f data-v-c3855bb3><div class="container" data-v-c3855bb3><p class="message" data-v-c3855bb3>Released under the MIT License.</p><p class="copyright" data-v-c3855bb3>Copyright © 2023-present crazywhalecc</p></div></footer><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"deps-craft-yml.md\":\"DaRp5sDR\",\"en_contributing_index.md\":\"Bw6aGZo7\",\"en_develop_artifact-model.md\":\"Be9wN_ZU\",\"en_develop_build-lifecycle.md\":\"BrkkrOI9\",\"en_develop_craft-yml.md\":\"CJqlRAWM\",\"en_develop_doctor-module.md\":\"BPx_gh7b\",\"en_develop_extending_annotations.md\":\"rWEgD5t7\",\"en_develop_extending_custom-artifact.md\":\"BQoftnUi\",\"en_develop_extending_dependency-injection.md\":\"3RvnsJs8\",\"en_develop_extending_index.md\":\"CBALgGvM\",\"en_develop_extending_lifecycle-hooks.md\":\"TH51ajMN\",\"en_develop_extending_package-classes.md\":\"DL47sxq4\",\"en_develop_index.md\":\"CDPdLdXm\",\"en_develop_package-model.md\":\"D5wiXvya\",\"en_develop_php-src-changes.md\":\"CIUUevPf\",\"en_develop_registry.md\":\"B5tf5XnG\",\"en_develop_structure.md\":\"B3aY4J4P\",\"en_develop_system-build-tools.md\":\"aR6vgJMi\",\"en_faq_index.md\":\"ButqLRAC\",\"en_guide_cli-generator.md\":\"B68go0TP\",\"en_guide_cli-reference.md\":\"B6zUxFdM\",\"en_guide_deps-map.md\":\"B9M0h5GJ\",\"en_guide_env-vars.md\":\"B5JOZL1S\",\"en_guide_extension-notes.md\":\"C1QFg1E9\",\"en_guide_extensions.md\":\"Dx8DsFkf\",\"en_guide_first-build.md\":\"C3LOd79t\",\"en_guide_index.md\":\"hf3edrTD\",\"en_guide_installation.md\":\"DNcSrgIL\",\"en_guide_migrate-from-v2.md\":\"CfVymFnT\",\"en_guide_sapi-reference.md\":\"Dx3FnmW6\",\"en_guide_troubleshooting.md\":\"Mc4ZUzP-\",\"en_index.md\":\"DSOSox5_\",\"index.md\":\"DvcHPFks\",\"zh_contributing_index.md\":\"BxNPLW0M\",\"zh_develop_artifact-model.md\":\"BtcNBk1j\",\"zh_develop_build-lifecycle.md\":\"D1JbjvDB\",\"zh_develop_craft-yml.md\":\"oQn7yY_F\",\"zh_develop_doctor-module.md\":\"DAzJoWwn\",\"zh_develop_extending_annotations.md\":\"DAa7FG7j\",\"zh_develop_extending_custom-artifact.md\":\"BTEWH7KO\",\"zh_develop_extending_dependency-injection.md\":\"PLkrv44m\",\"zh_develop_extending_index.md\":\"B478Mpx4\",\"zh_develop_extending_lifecycle-hooks.md\":\"BNdlHrBu\",\"zh_develop_extending_package-classes.md\":\"CLofM-pE\",\"zh_develop_index.md\":\"CYr92Q4h\",\"zh_develop_package-model.md\":\"DYRZ8aaf\",\"zh_develop_php-src-changes.md\":\"QIFUEZHE\",\"zh_develop_registry.md\":\"BvRBmoGT\",\"zh_develop_structure.md\":\"EpUhxfrR\",\"zh_develop_system-build-tools.md\":\"DEEE1raf\",\"zh_faq_index.md\":\"DkTldA8b\",\"zh_guide_cli-generator.md\":\"reUobI__\",\"zh_guide_cli-reference.md\":\"DMttieGz\",\"zh_guide_deps-map.md\":\"BsudOLor\",\"zh_guide_env-vars.md\":\"Bs72W99k\",\"zh_guide_extension-notes.md\":\"D-KMlaiu\",\"zh_guide_extensions.md\":\"BhhlCDFJ\",\"zh_guide_first-build.md\":\"CQdFhKsg\",\"zh_guide_index.md\":\"DaRL6Seg\",\"zh_guide_installation.md\":\"Ap2snxXu\",\"zh_guide_migrate-from-v2.md\":\"Df8wnmfP\",\"zh_guide_sapi-reference.md\":\"DXv5eV6I\",\"zh_guide_troubleshooting.md\":\"CueHHZkW\",\"zh_index.md\":\"BmqlzSTB\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"StaticPHP\",\"description\":\"A powerful tool designed for building portable executables including PHP, extensions, and more.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/images/static-php_nobg.png\",\"nav\":[],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/crazywhalecc/static-php-cli\"}],\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"},\"externalLinkIcon\":true,\"search\":{\"provider\":\"algolia\",\"options\":{\"appId\":\"IHJHUB1SF1\",\"apiKey\":\"8266d31cc2ffbd0e059f1c6e5bdaf8fc\",\"indexName\":\"static-php docs\",\"askAi\":{\"assistantId\":\"b72369b2-60a5-461d-902c-5c18d8c05902\",\"agentStudio\":true,\"sidePanel\":true}}}},\"locales\":{\"en\":{\"label\":\"English\",\"lang\":\"en\",\"themeConfig\":{\"nav\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Develop\",\"link\":\"/en/develop/\"},{\"text\":\"Contributing\",\"link\":\"/en/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/en/faq/\"},{\"text\":\"v3 (alpha)\",\"items\":[{\"text\":\"v3 (alpha)\",\"link\":\"/en/\"},{\"text\":\"v2\",\"link\":\"https://static-php.github.io/v2-docs/\"}]}],\"sidebar\":{\"/en/guide/\":[{\"text\":\"Getting Started\",\"items\":[{\"text\":\"Overview\",\"link\":\"/en/guide/\"},{\"text\":\"Installation\",\"link\":\"/en/guide/installation\"},{\"text\":\"First Build\",\"link\":\"/en/guide/first-build\"},{\"text\":\"PHP SAPI Reference\",\"link\":\"/en/guide/sapi-reference\"},{\"text\":\"CLI Reference\",\"link\":\"/en/guide/cli-reference\"},{\"text\":\"Migrating from v2\",\"link\":\"/en/guide/migrate-from-v2\"}]},{\"text\":\"Extensions\",\"items\":[{\"text\":\"Supported Extensions\",\"link\":\"/en/guide/extensions\"},{\"text\":\"Extension Notes\",\"link\":\"/en/guide/extension-notes\"},{\"text\":\"Build Command Generator\",\"link\":\"/en/guide/cli-generator\"}]},{\"text\":\"Reference\",\"items\":[{\"text\":\"Environment Variables\",\"link\":\"/en/guide/env-vars\"},{\"text\":\"Dependency Table\",\"link\":\"/en/guide/deps-map\"},{\"text\":\"Troubleshooting\",\"link\":\"/en/guide/troubleshooting\"}]}],\"/en/develop/\":[{\"text\":\"Overview\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/en/develop/\"},{\"text\":\"Project Structure\",\"link\":\"/en/develop/structure\"}]},{\"text\":\"Configuration Reference\",\"items\":[{\"text\":\"Registry\",\"link\":\"/en/develop/registry\"},{\"text\":\"Package Model\",\"link\":\"/en/develop/package-model\"},{\"text\":\"Artifact Model\",\"link\":\"/en/develop/artifact-model\"},{\"text\":\"craft.yml\",\"link\":\"/en/develop/craft-yml\"}]},{\"text\":\"Build System\",\"items\":[{\"text\":\"Build Lifecycle\",\"link\":\"/en/develop/build-lifecycle\"},{\"text\":\"Compilation Tools\",\"link\":\"/en/develop/system-build-tools\"},{\"text\":\"Doctor\",\"link\":\"/en/develop/doctor-module\"},{\"text\":\"PHP Source Modifications\",\"link\":\"/en/develop/php-src-changes\"}]},{\"text\":\"Extending StaticPHP\",\"items\":[{\"text\":\"Introduction\",\"link\":\"/en/develop/extending/\"},{\"text\":\"Writing Package Classes\",\"link\":\"/en/develop/extending/package-classes\"},{\"text\":\"Annotations Reference\",\"link\":\"/en/develop/extending/annotations\"},{\"text\":\"Lifecycle Hooks\",\"link\":\"/en/develop/extending/lifecycle-hooks\"},{\"text\":\"Dependency Injection\",\"link\":\"/en/develop/extending/dependency-injection\"},{\"text\":\"Custom Artifact\",\"link\":\"/en/develop/extending/custom-artifact\"}]}],\"/en/contributing/\":[{\"text\":\"Contributing\",\"items\":[{\"text\":\"Contributing Guide\",\"link\":\"/en/contributing/\"}]}],\"/en/faq/\":[{\"text\":\"FAQ\",\"items\":[{\"text\":\"Frequently Asked Questions\",\"link\":\"/en/faq/\"}]}]},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"}}},\"zh\":{\"label\":\"简体中文\",\"lang\":\"zh\",\"themeConfig\":{\"nav\":[{\"text\":\"构建指南\",\"link\":\"/zh/guide/\"},{\"text\":\"开发者\",\"link\":\"/zh/develop/\"},{\"text\":\"贡献\",\"link\":\"/zh/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/zh/faq/\"},{\"text\":\"v3 (alpha)\",\"items\":[{\"text\":\"v3 (alpha)\",\"link\":\"/zh/\"},{\"text\":\"v2\",\"link\":\"https://static-php.github.io/v2-docs/\"}]}],\"sidebar\":{\"/zh/guide/\":[{\"text\":\"快速上手\",\"items\":[{\"text\":\"概览\",\"link\":\"/zh/guide/\"},{\"text\":\"安装\",\"link\":\"/zh/guide/installation\"},{\"text\":\"第一次构建\",\"link\":\"/zh/guide/first-build\"},{\"text\":\"PHP SAPI 构建参考\",\"link\":\"/zh/guide/sapi-reference\"},{\"text\":\"命令行参考\",\"link\":\"/zh/guide/cli-reference\"},{\"text\":\"从 v2 迁移\",\"link\":\"/zh/guide/migrate-from-v2\"}]},{\"text\":\"扩展\",\"items\":[{\"text\":\"支持的扩展列表\",\"link\":\"/zh/guide/extensions\"},{\"text\":\"扩展注意事项\",\"link\":\"/zh/guide/extension-notes\"},{\"text\":\"命令生成器\",\"link\":\"/zh/guide/cli-generator\"}]},{\"text\":\"参考\",\"items\":[{\"text\":\"环境变量\",\"link\":\"/zh/guide/env-vars\"},{\"text\":\"依赖关系图\",\"link\":\"/zh/guide/deps-map\"},{\"text\":\"故障排除\",\"link\":\"/zh/guide/troubleshooting\"}]}],\"/zh/develop/\":[{\"text\":\"概览\",\"items\":[{\"text\":\"开发简介\",\"link\":\"/zh/develop/\"},{\"text\":\"项目结构\",\"link\":\"/zh/develop/structure\"}]},{\"text\":\"配置参考\",\"items\":[{\"text\":\"Registry\",\"link\":\"/zh/develop/registry\"},{\"text\":\"Package 模型\",\"link\":\"/zh/develop/package-model\"},{\"text\":\"Artifact 模型\",\"link\":\"/zh/develop/artifact-model\"},{\"text\":\"craft.yml 配置\",\"link\":\"/zh/develop/craft-yml\"}]},{\"text\":\"构建系统\",\"items\":[{\"text\":\"构建生命周期\",\"link\":\"/zh/develop/build-lifecycle\"},{\"text\":\"编译工具\",\"link\":\"/zh/develop/system-build-tools\"},{\"text\":\"Doctor 环境检查\",\"link\":\"/zh/develop/doctor-module\"},{\"text\":\"对 PHP 源码的修改\",\"link\":\"/zh/develop/php-src-changes\"}]},{\"text\":\"扩展 StaticPHP\",\"items\":[{\"text\":\"简介\",\"link\":\"/zh/develop/extending/\"},{\"text\":\"编写 Package 类\",\"link\":\"/zh/develop/extending/package-classes\"},{\"text\":\"注解参考\",\"link\":\"/zh/develop/extending/annotations\"},{\"text\":\"生命周期 Hook\",\"link\":\"/zh/develop/extending/lifecycle-hooks\"},{\"text\":\"依赖注入\",\"link\":\"/zh/develop/extending/dependency-injection\"},{\"text\":\"自定义 Artifact\",\"link\":\"/zh/develop/extending/custom-artifact\"}]}],\"/zh/contributing/\":[{\"text\":\"贡献指南\",\"items\":[{\"text\":\"贡献指南\",\"link\":\"/zh/contributing/\"}]}],\"/zh/faq/\":[{\"text\":\"FAQ\",\"items\":[{\"text\":\"常见问题\",\"link\":\"/zh/faq/\"}]}]},\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2023-present crazywhalecc\"}}}},\"scrollOffset\":134,\"cleanUrls\":false,\"additionalConfig\":{}}");</script>
</body>
</html>