<divid="app"><divclass="Layout"data-v-5d98c3a5><!--[--><!--]--><!--[--><spantabindex="-1"data-v-0f60ec36></span><ahref="#VPContent"class="VPSkipLink visually-hidden"data-v-0f60ec36> Skip to content </a><!--]--><!----><headerclass="VPNav"data-v-5d98c3a5data-v-ae24b3ad><divclass="VPNavBar top"data-v-ae24b3addata-v-ccf7ddec><divclass="wrapper"data-v-ccf7ddec><divclass="container"data-v-ccf7ddec><divclass="title"data-v-ccf7ddec><divclass="VPNavBarTitle"data-v-ccf7ddecdata-v-ab179fa1><aclass="title"href="/en/"data-v-ab179fa1><!--[--><!--]--><!----><spandata-v-ab179fa1>static-php-cli</span><!--[--><!--]--></a></div></div><divclass="content"data-v-ccf7ddec><divclass="content-body"data-v-ccf7ddec><!--[--><!--]--><divclass="VPNavBarSearch search"data-v-ccf7ddec><!----></div><navaria-labelledby="main-nav-aria-label"class="VPNavBarMenu menu"data-v-ccf7ddecdata-v-7f418b0f><spanid="main-nav-aria-label"class="visually-hidden"data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><aclass="VPLink link VPNavBarMenuLink"href="/en/guide/"tabindex="0"data-v-7f418b0fdata-v-9c663999><!--[--><spandata-v-9c663999>Guide</span><!--]--></a><!--]--><!--[--><aclass="VPLink link VPNavBarMenuLink"href="/en/develop/"tabindex="0"data-v-7f418b0fdata-v-9c663999><!--[--><spandata-v-9c663999>Developing</span><!--]--></a><!--]--><!--[--><aclass="VPLink link VPNavBarMenuLink"href="/en/contributing/"tabindex="0"data-v-7f418b0fdata-v-9c663999><!--[--><spandata-v-9c663999>Contributing</span><!--]--></a><!--]--><!--[--><aclass="VPLink link VPNavBarMenuLink active"href="/en/faq/"tabindex="0"data-v-7f418b0fdata-v-9c663999><!--[--><spandata-v-9c663999>FAQ</span><!--]--></a><!--]--><!--]--></nav><divclass="VPFlyout VPNavBarTranslations translations"data-v-ccf7ddecdata-v-88af2de4data-v-b6c34ac9><buttontype="button"class="button"aria-haspopup="true"aria-expanded="false"aria-label="Change language"data-v-b6c34ac9><spanclass="text"data-v-b6c34ac9><spanclass="vpi-languages option-icon"data-v-b6c34ac9></span><!----><spanclass="vpi-chevron-down text-icon"data-v-b6c34ac9></span></span></button><divclass="menu"data-v-b6c34ac9><divclass="VPMenu"data-v-b6c34ac9data-v-e7ea1737><!----><!--[--><!--[--><divclass="items"data-v-88af2de4><pclass="title"data-v-88af2de4>English</p><!--[--><divclass="VPMenuLink"data-v-88af2de4data-v-43f1e123><aclass="VPLink link"href="/zh/faq/"data-v-43f1e123><!--[-->简体中文<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><divclass="VPNavBarAppearance appearance"data-v-ccf7ddecdata-v-e6aabb21><buttonclass="VPSwitch VPSwitchAppearance"type="button"role="switch"title="Switch to dark theme"aria-checked="false"data-v-e6aabb21data-v-d1f28634data-v-1d5665e3><spanclass="check"data-v-1d5665e3><spanclass="icon"data-v-1d5665e3><!--[--><spanclass="vpi-sun sun"data-v-d1f28634></span><spanclass="vpi-moon moon"data-v-d1f28634></span><!--]--></span></span></button></div><divclass="VPSocialLinks VPNavBarSocialLinks social-links"data-v-ccf7ddecdata-v-0394ad82data-v-7bc22406><!--[--><aclass="VPSocialLink no-icon"href="https://github.com/crazywhalecc/static-php-cli"aria-label="github"target="_blank"rel="noopener"data-v-7bc22406data-v-eee4e7cb><spanclass="vpi-social-github"/></a><!--]--></div><divclass="VPFlyout VPNavBarExtra extra"data-v-ccf7ddecdata-v-d0bd9ddedata-v-b6c34ac9><buttontype="button"class="button"aria-haspopup="true"aria-expanded="false"aria-label="extra navigation"data-v-b6c34ac9><spanclass="vpi-more-horizontal icon"data-v-b6c34ac9></span></button><divclass="menu"data-v-b6c34ac9><divclass="VPMenu"data-v-b6c34ac9data-v-e7ea1737><!----><!--[--><!--[--><divclass="group translations"data-v-d0bd9dde><pclass="trans-title"data-v-d0bd9dde>English</p><!--[--><divclass="VPMenuLink"data-v-d0bd9ddedata-v-43f1e123><aclass="VPLink link"href="/zh/faq/"data-v-43f1e123><!--[-->简体中文<!--]--></a></div><!--]--></div><divclass="group"data-v-d0bd9dde><divclass="item appearance"data-v-d0bd9dde>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ffi</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-strip</span></span></code></pre></div><p>For the Linux platform, the current compilation result is a purely statically linked binary file, and new extensions cannot be installed using a dynamic link library.</p><h2id="can-it-support-oracle-database-extension"tabindex="-1">Can it support Oracle database extension? <aclass="header-anchor"href="#can-it-support-oracle-database-extension"aria-label="Permalink to "Can it support Oracle database extension?""></a></h2><p>Some extensions that rely on closed source libraries, such as <code>oci8</code>, <code>sourceguardian</code>, etc., they do not provide purely statically compiled dependent library files (<code>.a</code>), only dynamic dependent library files (<code>.so</code>). These extensions cannot be compiled into static-php-cli from source, so this project may never support them. However, in theory, you can access and use such extensions under macOS according to the above questions.</p><p>If you have a need for such extensions, or most people have needs for these closed-source extensions, see the discussion on <ahref="https://github.com/crazywhalecc/static-php-cli/discussions/58"target="_blank"rel="noreferrer">standalone-php-cli</a>. Welcome to leave a message.</p><h2id="does-it-support-windows"tabindex="-1">Does it support Windows? <aclass="header-anchor"href="#does-it-support-windows"aria-label="Permalink to "Does it support Windows?""></a></h2><p>The project currently supports Windows, but the number of supported extensions is small. Windows support is not perfect. There are mainly the following problems:</p><ol><li>The compilation process of Windows is different from that of *nix, and the toolchain used is also different. The compilation tools used to compile the dependent libraries of each extension are almost completely different.</li><li>The demand for the Windows version will also be advanced based on the needs of all people who use this project. If many people need it, I will support related extensions as soon as possible.</li></ol><h2id="can-i-protect-my-source-code-with-micro"tabindex="-1">Can I protect my source code with micro? <aclass="header-anchor"href="#can-i-protect-my-source-code-with-micro"aria-label="Permalink to "Can I protect my source code with micro?""></a></h2><p>You can't. micro.sfx is essentially combining php and php code into one file, there is no process of compiling or encrypting the PHP code.</p><p>First of all, php-src is the official interpreter of PHP code, and there is no PHP compiler compatible with mainstream branches on the market. I saw on the Internet that there is a project called BPC (Binary PHP Compiler?) that can compile PHP into binary, but there are many restrictions.</p><p>The direction of encrypting and protecting the code is not the same as compiling. After compiling, the code can also be obtained through reverse engineering and other methods. The real protection is still carried out by means of packing and encrypting the code.</p><p>Therefore, this project (static-php-cli) and related projects (lwmbs, swoole-cli) all provide a convenient compilation tool for php-src source code. The phpmicro referenced by this project and related projects is only a package of PHP's sapi interface, not a compilation tool for PHP code. The compiler for PHP code is a completely different project, so the extra cases are not taken into account. If you are interested in encryption, you can consider using existing encryption technologies, such as Swoole Compiler, Source Guardian, etc.</p><h2id="unable-to-use-ssl"tabindex="-1">Unable to use ssl <aclass="header-anchor"href="#unable-to-use-ssl"aria-label="Permalin