static-php-cli/en/guide/build-on-windows.html

47 lines
44 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Build on Windows | Static PHP</title>
<meta name="description" content="Build single static PHP binary, with PHP project together, with popular extensions included.">
<meta name="generator" content="VitePress v2.0.0-alpha.12">
<link rel="preload stylesheet" href="/assets/style.Djf3bAdT.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.C9FYtCRt.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.MOrVMOSc.js">
<link rel="modulepreload" href="/assets/chunks/framework.Bhsyh9kO.js">
<link rel="modulepreload" href="/assets/en_guide_build-on-windows.md.DiYVSaPG.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>Static PHP</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>Advanced</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><!--]--><!--]--></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/build-on-windows.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-l
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> C:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pc-build</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/crazywhalecc/static-php-cli.git</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> static-php-cli</span></span></code></pre></div><p>It is a bit strange that static-php-cli itself requires a PHP environment, but now you can quickly install the PHP environment through a script. Generally, your computer will not have the Windows version of PHP installed, so we recommend that you use <code>bin/setup-runtime</code> directly after downloading static-php-cli to install PHP and Composer in the current directory.</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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 PHP and Composer to the ./runtime/ directory</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># After installation, if you need to use PHP and Composer in global commands, </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># use the following command to add the runtime/ directory to PATH</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -action</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add-path</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Delete the runtime/ directory in PATH</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/setup-runtime</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -action</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> remove-path</span></span></code></pre></div><p>Finally, now that you have PHP and Composer installed, you need to install static-php-cli&#39;s Composer dependencies:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;">composer</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div><h3 id="install-other-tools-automatic" tabindex="-1">Install other Tools (automatic) <a class="header-anchor" href="#install-other-tools-automatic" aria-label="Permalink to “Install other Tools (automatic)”"></a></h3><p>For <code>php-sdk-binary-tools</code>, <code>strawberry-perl</code>, and <code>nasm</code>, we recommend that you directly use the command <code>bin/spc doctor</code> to check and install them.</p><p>If doctor successfully installs automatically, please <strong>skip</strong> the steps below to manually install the above tools.</p><p>But if the automatic installation fails, please refer to the manual installation method below.</p><h3 id="install-php-sdk-binary-tools-manual" tabindex="-1">Install php-sdk-binary-tools (manual) <a class="header-anchor" href="#install-php-sdk-binary-tools-manual" aria-label="Permalink to “Install php-sdk-binary-tools (manual)”"></a></h3><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> C:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pc-build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">tatic-php-cli</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/php/php-sdk-binary-tools.git</span></span></code></pre></div><blockquote><p>You can also set the global variable <code>PHP_SDK_PATH</code> in Windows settings and clone the project to the path corresponding to the variable. Under normal circumstances, you don&#39;t need to change it.</p></blockquote><h3 id="install-strawberry-perl-manual" tabindex="-1">Install strawberry-perl (manual) <a class="header-anchor" href="#install-strawberry-perl-manual" aria-label="Permalink to “Install strawberry-perl (manual)”"></a></h3><blockquote><p>If you don&#39;t need to compile the openssl extension, you don&#39;t need to install perl.</p></blockquote><ol><li>Download the latest version of strawberry-perl from <a href="https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/" target="_blank" rel="noreferrer">GitHub</a>.</li><li>Install to the <code>C:\spc-build\static-php-cli\pkgroot\perl\</code> directory.</li></ol><blockquote><p>You can download the <code>-portable</code> version and extract it directly to the above directory. The last <code>perl.exe</code> should be located at <code>C:\spc-build\static-php-cli\pkgroot\perl\perl\bin\perl.exe</code>.</p></blockquote><h3 id="install-nasm-manual" tabindex="-1">Install nasm (manual) <a class="header-anchor" href="#install-nasm-manual" aria-label="Permalink to “Install nasm (manual)”"></a></h3><blockquote><p>If you don&#39;t need to compile openssl extension, you don&#39;t need to install nasm.</p></blockquote><ol><li>Download the nasm tool (x64) from <a href="https://www.nasm.us/pub/nasm/releasebuilds/" target="_blank" rel="noreferrer">official website</a>.</li><li>Place <code>nasm.exe</code> and <code>ndisasm.exe</code> in the <code>C:\spc-build\static-php-cli\php-sdk-binary-tools\bin\</code> directory.</li></ol><h2 id="download-required-sources" tabindex="-1">Download required sources <a class="header-anchor" href="#download-required-sources" aria-label="Permalink to “Download required sources”"></a></h2><p>Same as <a href="./manual-build.html#command-download">Manual build - Download</a></p><h2 id="build-php" tabindex="-1">Build PHP <a class="header-anchor" href="#build-php" aria-label="Permalink to “Build PHP”"></a></h2><p>Use the build command to start building the static php binary. Before executing the <code>bin/spc build</code> command, be sure to use the <code>download</code> command to download sources. It is recommended to use <code>doctor</code> to check the environment.</p><h3 id="build-sapi" tabindex="-1">Build SAPI <a class="header-anchor" href="#build-sapi" aria-label="Permalink to “Build SAPI”"></a></h3><p>You need to go to <a href="./extensions.html">Extension List</a> or <a href="./cli-generator.html">Command Generator</a> to select the extension you want to add, and then use the command <code>bin/spc build</code> to compile. You need to specify targets, choose from the following parameters (at least one):</p><ul><li><code>--build-cli</code>: Build a cli sapi (command line interface, which can execute PHP code on the command line)</li><li><code>--build-micro</code>: Build a micro sapi (used to build a standalone executable binary containing PHP code)</li></ul><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;"># Compile PHP with bcmath,openssl,zlib extensions, the compilation target is cli</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,zlib&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;"># Compile PHP with phar,curl,posix,pcntl,tokenizer extensions, compile target is micro and cli</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;bcmath,openssl,zlib&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-micro</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title custom-block-title-default">WARNING</p><p>In Windows, it is best to use double quotes to wrap parameters containing commas, such as <code>&quot;bcmath,openssl,mbstring&quot;</code>.</p></div><h3 id="debug" tabindex="-1">Debug <a class="header-anchor" href="#debug" aria-label="Permalink to “Debug”"></a></h3><p>If you encounter problems during the compilation process, or want to view each executing shell command, you can use <code>--debug</code> to enable debug mode and view all terminal logs:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;openssl&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --debug</span></span></code></pre></div><h3 id="build-options" tabindex="-1">Build Options <a class="header-anchor" href="#build-options" aria-label="Permalink to “Build Options”"></a></h3><p>During the compilation process, in some special cases, the compiler and the content of the compilation directory need to be intervened. You can try to use the following commands:</p><ul><li><code>--with-clean</code>: clean up old make files before compiling PHP</li><li><code>--enable-zts</code>: Make compiled PHP thread-safe version (default is NTS version)</li><li><code>--with-libs=XXX,YYY</code>: Compile the specified dependent library before compiling PHP, and activate some extension optional functions</li><li><code>--with-config-file-scan-dir=XXX</code>: Set the directory to scan for <code>.ini</code> files after reading <code>php.ini</code> (Check <a href="./../faq/index.html#what-is-the-path-of-php-ini">here</a> for default paths)</li><li><code>-I xxx=yyy</code>: Hard compile INI options into PHP before compiling (support multiple options, alias is <code>--with-hardcoded-ini</code>)</li><li><code>--with-micro-fake-cli</code>: When compiling micro, let micro&#39;s <code>PHP_SAPI</code> pretend to be <code>cli</code> (for compatibility with some programs that check <code>PHP_SAPI</code>)</li><li><code>--disable-opcache-jit</code>: Disable opcache jit (enabled by default)</li><li><code>--without-micro-ext-test</code>: After building micro.sfx, do not test the running results of different extensions in micro.sfx</li><li><code>--with-suggested-exts</code>: Add <code>ext-suggests</code> as dependencies when compiling</li><li><code>--with-suggested-libs</code>: Add <code>lib-suggests</code> as dependencies when compiling</li><li><code>--with-upx-pack</code>: Use UPX to reduce the size of the binary file after compilation (you need to use <code>bin/spc install-pkg upx</code> to install upx first)</li><li><code>--with-micro-logo=XXX.ico</code>: Customize the icon of the <code>exe</code> executable file after customizing the micro build (in the format of <code>.ico</code>)</li></ul><p>Here is a simple example where we preset a larger <code>memory_limit</code> and disable the <code>system</code> function:</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark" style="-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> hello.php</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Then we got `my-app.exe` with custom logo!</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">my-app.exe</span></span></code></pre></div><h2 id="use-php-exe" tabindex="-1">Use php.exe <a class="header-anchor" href="#use-php-exe" aria-label="Permalink to “Use php.exe”"></a></h2><p>After php.exe is compiled, it is located in the <code>buildroot\bin\</code> directory. You can copy it to any location for use.</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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:#005CC5;--shiki-dark:#79B8FF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span></span></code></pre></div><h2 id="use-micro-sfx" tabindex="-1">Use micro.sfx <a class="header-anchor" href="#use-micro-sfx" aria-label="Permalink to “Use micro.sfx”"></a></h2><blockquote><p>phpmicro is a SelF-extracted eXecutable SAPI module, provided by <a href="https://github.com/dixyes/phpmicro" target="_blank" rel="noreferrer">phpmicro</a> project. But this project is using a <a href="https://github.com/static-php/phpmicro" target="_blank" rel="noreferrer">fork</a> of phpmicro, because we need to add some features to it. It can put php runtime and your source code together.</p></blockquote><p>The final compilation result will output a file named <code>./micro.sfx</code>, which needs to be used with your PHP source code like <code>code.php</code>. This file will be located in the path <code>buildroot/bin/micro.sfx</code>.</p><p>Prepare your project source code, which can be a single PHP file or a Phar file, for use.</p><blockquote><p>If you want to combine phar files, you must add <code>phar</code> extension when compiling!</p></blockquote><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</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;"># code.php &quot;&lt;?php echo &#39;Hello world&#39; . PHP_EOL;&quot;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> micro:combine</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> code.php</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -O</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-app.exe</span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run it!!! Copy it to another computer!!!</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./my-app.exe</span></span></code></pre></div><p>If you package a PHAR file, just replace <code>code.php</code> with the phar file path. You can use <a href="https://github.com/box-project/box" target="_blank" rel="noreferrer">box-project/box</a> to package your CLI project as Phar, It is then combined with phpmicro to produce a standalone executable binary.</p><p>For more details on the <code>micro:combine</code> command, refer to <a href="./manual-build.html">command</a> on Unix systems.</p></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/troubleshooting.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>Troubleshooting</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/en/guide/build-with-glibc.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>Build with GNU libc</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\":\"DqNYV3B0\",\"deps-map-ext.md\":\"DR2SrlYE\",\"deps-map-lib.md\":\"CX4X3zvJ\",\"en_contributing_index.md\":\"fCA6lXnW\",\"en_develop_craft-yml.md\":\"Ci97ssL7\",\"en_develop_doctor-module.md\":\"BTDyp-aK\",\"en_develop_index.md\":\"DUNrUVP9\",\"en_develop_php-src-changes.md\":\"dN8aSiwg\",\"en_develop_source-module.md\":\"CTCLlqsP\",\"en_develop_structure.md\":\"X2JId3N9\",\"en_develop_system-build-tools.md\":\"BmQhyTle\",\"en_faq_index.md\":\"C_VQHF6y\",\"en_guide_action-build.md\":\"Dnzq6gNC\",\"en_guide_build-on-windows.md\":\"DiYVSaPG\",\"en_guide_build-with-glibc.md\":\"CkVR75n5\",\"en_guide_cli-generator.md\":\"YP_2v551\",\"en_guide_deps-map.md\":\"BFHhtLLm\",\"en_guide_env-vars.md\":\"51DQ7bvx\",\"en_guide_extension-notes.md\":\"CHFGRiKx\",\"en_guide_extensions.md\":\"dz-wWH_X\",\"en_guide_index.md\":\"C0gwKWb1\",\"en_guide_manual-build.md\":\"Cpul-SQI\",\"en_guide_troubleshooting.md\":\"D19jRB1K\",\"en_index.md\":\"Yhlq3Fhs\",\"extension-notes.md\":\"BB7Xlw1w\",\"extensions.md\":\"D7RRv-1u\",\"index.md\":\"CZze5I_S\",\"zh_contributing_index.md\":\"fiiKMXnj\",\"zh_develop_craft-yml.md\":\"CAUu6v38\",\"zh_develop_doctor-module.md\":\"1NRXIINs\",\"zh_develop_index.md\":\"CRxnJZDt\",\"zh_develop_php-src-changes.md\":\"CwVUc0oE\",\"zh_develop_source-module.md\":\"CS1VBo_1\",\"zh_develop_structure.md\":\"CEd1RycZ\",\"zh_develop_system-build-tools.md\":\"CQ4BvPVa\",\"zh_faq_index.md\":\"DyNJg3PZ\",\"zh_guide_action-build.md\":\"CQ3Vf3i9\",\"zh_guide_build-on-windows.md\":\"oogWrPn_\",\"zh_guide_build-with-glibc.md\":\"CHXyK61r\",\"zh_guide_cli-generator.md\":\"ChYwHMrg\",\"zh_guide_deps-map.md\":\"DhQX1rEp\",\"zh_guide_env-vars.md\":\"CtNlqGk4\",\"zh_guide_extension-notes.md\":\"BCwDjBZH\",\"zh_guide_extensions.md\":\"BRE-fKov\",\"zh_guide_index.md\":\"BBGjnhq-\",\"zh_guide_manual-build.md\":\"D2CB8hfN\",\"zh_guide_troubleshooting.md\":\"BRQLW2WP\",\"zh_index.md\":\"DO7udOc6\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Static PHP\",\"description\":\"Build single static PHP binary, with PHP project together, with popular extensions included.\",\"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\"},\"search\":{\"provider\":\"algolia\",\"options\":{\"appId\":\"IHJHUB1SF1\",\"apiKey\":\"8266d31cc2ffbd0e059f1c6e5bdaf8fc\",\"indexName\":\"static-php docs\"}}},\"locales\":{\"en\":{\"label\":\"English\",\"lang\":\"en\",\"themeConfig\":{\"nav\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Advanced\",\"link\":\"/en/develop/\"},{\"text\":\"Contributing\",\"link\":\"/en/contributing/\"},{\"text\":\"FAQ\",\"link\":\"/en/faq/\"}],\"sidebar\":{\"/en/guide/\":[{\"text\":\"Basic Build Guides\",\"items\":[{\"text\":\"Guide\",\"link\":\"/en/guide/\"},{\"text\":\"Build (Local)\",\"link\":\"/en/guide/manual-build\"},{\"text\":\"Build (CI)\",\"link\":\"/en/guide/action-build\"},{\"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\":\"Environment Variables\",\"link\":\"/en/guide/env-vars\",\"collapsed\":true},{\"text\":\"Dependency Table\",\"link\":\"/en/guide/deps-map\"}]},{\"text\":\"Extended Build Guides\",\"items\":[{\"text\":\"Troubleshooting\",\"link\":\"/en/guide/troubleshooting\"},{\"text\":\"Build on Windows\",\"link\":\"/en/guide/build-on-windows\"},{\"text\":\"Build with GNU libc\",\"link\":\"/en/guide/build-with-glibc\"}]}],\"/en/develop/\":[{\"text\":\"Development\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/en/develop/\"},{\"text\":\"Project Structure\",\"link\":\"/en/develop/structure\"},{\"text\":\"PHP Source Modifica
</body>
</html>