diff --git a/404.html b/404.html index 6542df32..b9f373ad 100644 --- a/404.html +++ b/404.html @@ -16,7 +16,7 @@
- + \ No newline at end of file diff --git a/assets/chunks/CliGenerator.CBybgzdB.js b/assets/chunks/CliGenerator.CBybgzdB.js new file mode 100644 index 00000000..56e08895 --- /dev/null +++ b/assets/chunks/CliGenerator.CBybgzdB.js @@ -0,0 +1,12 @@ +import{d as ge,x as w,h as z,z as _,c as g,o as x,j as e,e as C,ag as h,t as n,G as j,H as N,ah as f,ai as F,aj as Y,ak as Z,a as xe,_ as he}from"./framework.PeLcR_tw.js";const me={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ye={type:"external",source:"apcu"},ve={type:"external",source:"ast"},fe={type:"builtin"},ze={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},Se={type:"builtin","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["bzip2"]},De={type:"builtin"},ke={type:"builtin"},Be={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},qe={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},Ee={support:{BSD:"wip"},type:"external",source:"dio"},Ce={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},We={type:"external",source:"ext-ds"},Pe={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ie={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},$e={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Ue={type:"builtin"},Le={support:{Linux:"partial",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},je={type:"builtin"},Ne={type:"builtin"},Oe={type:"builtin","lib-suggests":["openssl"]},Ve={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ae={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gettext"]},Te={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},_e={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},Ge={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},He={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Me={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Re={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Fe={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Ze={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Qe={support:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},Ke={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ye={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],target:["static"]},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ei={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},ii={type:"builtin","arg-type":"custom"},si={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},ti={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"lib-depends-unix":["libmemcached","fastlz"],"ext-depends":["session","zlib"]},ni={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"],frameworks:["CoreFoundation","Security"]},oi={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable","ext-depends":["session"]},ai={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},di={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},ui={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},pi={support:{BSD:"wip",Windows:"wip"},type:"builtin","arg-type-unix":"custom","lib-depends-unix":["unixodbc"]},ri={type:"builtin","arg-type-unix":"custom","zend-extension":!0},ci={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","build-with-php":!0,"lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},bi={support:{BSD:"wip"},type:"external",source:"opentelemetry"},wi={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},gi={support:{Windows:"no"},type:"builtin","unix-only":!0},xi={type:"builtin"},hi={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},mi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends-unix":["unixodbc"],"ext-depends":["pdo","odbc"]},yi={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"custom","ext-depends":["pdo","pgsql"],"lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},vi={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},fi={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},zi={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},Si={type:"builtin","ext-depends":["zlib"]},Di={support:{Windows:"no"},type:"builtin","unix-only":!0},ki={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},Bi={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},qi={support:{BSD:"wip",Windows:"wip"},type:"external",source:"ext-rdkafka","arg-type":"custom","cpp-extension":!0,"lib-depends":["librdkafka"]},Ei={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["readline"],target:["static"]},Ci={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},Wi={type:"builtin","build-with-php":!0},Pi={type:"builtin","build-with-php":!0},Ii={type:"external",source:"ext-simdjson","cpp-extension":!0},$i={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},Ui={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},Li={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},ji={type:"builtin"},Ni={support:{BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},Oi={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Vi={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends":["sqlite"]},Ai={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Ti={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-path","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends":["openssl","zlib"]},_i={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},Gi={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},Xi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Hi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Mi={support:{BSD:"wip"},type:"builtin"},Ri={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["tidy"]},Fi={type:"builtin","build-with-php":!0},Zi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-path","lib-depends":["libuuid"]},Qi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-path","lib-depends":["libuv"],"ext-depends":["sockets"]},Ki={type:"external",source:"xdebug",target:["shared"],support:{Windows:"wip",BSD:"no",Darwin:"partial",Linux:"partial"},notes:!0,"zend-extension":!0},Yi={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"],"build-with-php":!0},Ji={support:{BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},es={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"],"build-with-php":!0},is={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"],"build-with-php":!0},ss={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},ts={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},ls={type:"external",source:"ext-xz","arg-type":"with","lib-depends":["xz"]},ns={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","lib-depends-unix":["fastlz"],"ext-depends-unix":["igbinary"]},os={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["libyaml"]},as={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},ds={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"],target:["static"]},us={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},ps={amqp:me,apcu:ye,ast:ve,bcmath:fe,brotli:ze,bz2:Se,calendar:De,ctype:ke,curl:Be,dba:qe,dio:Ee,dom:Ce,ds:We,enchant:Pe,ev:Ie,event:$e,exif:Ue,ffi:Le,fileinfo:je,filter:Ne,ftp:Oe,gd:Ve,gettext:Ae,glfw:Te,gmp:_e,gmssl:Ge,grpc:Xe,iconv:He,igbinary:Me,imagick:Re,imap:Fe,inotify:Ze,intl:Qe,ldap:Ke,libxml:Ye,lz4:Je,mbregex:ei,mbstring:ii,mcrypt:si,memcache:ti,memcached:li,mongodb:ni,msgpack:oi,mysqli:ai,mysqlnd:di,oci8:ui,odbc:pi,opcache:ri,openssl:ci,opentelemetry:bi,parallel:wi,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-path","lib-depends":["libargon2"]},pcntl:gi,pdo:xi,pdo_mysql:hi,pdo_odbc:mi,pdo_pgsql:yi,pdo_sqlite:vi,pdo_sqlsrv:fi,pgsql:zi,phar:Si,posix:Di,protobuf:ki,rar:Bi,rdkafka:qi,readline:Ei,redis:Ci,session:Wi,shmop:Pi,simdjson:Ii,simplexml:$i,snappy:Ui,soap:Li,sockets:ji,sodium:Ni,spx:Oi,sqlite3:Vi,sqlsrv:Ai,ssh2:Ti,swoole:_i,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:Gi,sysvmsg:Xi,sysvsem:Hi,sysvshm:Mi,tidy:Ri,tokenizer:Fi,uuid:Zi,uv:Qi,xdebug:Ki,xhprof:Yi,xlswriter:Ji,xml:es,xmlreader:is,xmlwriter:ss,xsl:ts,xz:ls,yac:ns,yaml:os,zip:as,zlib:ds,zstd:us},rs={type:"root",source:"php-src","lib-depends":["lib-base","micro"],"lib-suggests-linux":["libacl"]},cs={type:"target",source:"micro"},bs={source:"attr","static-libs-unix":["libattr.a"]},ws={source:"brotli","pkg-configs":["libbrotlicommon","libbrotlidec","libbrotlienc"],"static-libs-windows":["brotlicommon.lib","brotlienc.lib","brotlidec.lib"],headers:["brotli"]},gs={source:"bzip2","static-libs-unix":["libbz2.a"],"static-libs-windows":["libbz2.lib","libbz2_a.lib"],headers:["bzlib.h"]},xs={source:"curl","static-libs-unix":["libcurl.a"],"static-libs-windows":["libcurl_a.lib"],headers:["curl"],"lib-depends-unix":["openssl","zlib"],"lib-depends-windows":["zlib","libssh2","nghttp2"],"lib-suggests-unix":["libssh2","brotli","nghttp2","nghttp3","ngtcp2","zstd","libcares","ldap"],"lib-suggests-windows":["brotli","zstd"],frameworks:["CoreFoundation","CoreServices","SystemConfiguration"]},hs={source:"fastlz","static-libs-unix":["libfastlz.a"],headers:["fastlz/fastlz.h"]},ms={source:"freetype","static-libs-unix":["libfreetype.a"],"static-libs-windows":["libfreetype_a.lib"],"headers-unix":["freetype2/freetype/freetype.h","freetype2/ft2build.h"],"lib-depends":["zlib"],"lib-suggests":["libpng","bzip2","brotli"]},ys={source:"gettext","static-libs-unix":["libintl.a"],"lib-depends":["libiconv"],"lib-suggests":["ncurses","libxml2"],frameworks:["CoreFoundation"]},vs={source:"ext-glfw","static-libs-unix":["libglfw3.a"],frameworks:["CoreVideo","OpenGL","Cocoa","IOKit"]},fs={source:"gmp","static-libs-unix":["libgmp.a"],"static-libs-windows":["libgmp.lib"],headers:["gmp.h"]},zs={source:"gmssl","static-libs-unix":["libgmssl.a"],"static-libs-windows":["gmssl.lib"],frameworks:["Security"]},Ss={source:"grpc","pkg-configs":["grpc"],"lib-depends":["zlib","openssl","libcares"],"provide-pre-built":!0,frameworks:["CoreFoundation"]},Ds={source:"icu","cpp-library":!0,"pkg-configs":["icu-uc","icu-i18n","icu-io"]},ks={source:"imagemagick","pkg-configs":["Magick++-7.Q16HDRI","MagickCore-7.Q16HDRI","MagickWand-7.Q16HDRI"],"lib-depends":["zlib","libjpeg","libjxl","libpng","libwebp","freetype","libtiff","libheif","bzip2"],"lib-suggests":["zstd","xz","libzip","libxml2"]},Bs={source:"imap","static-libs-unix":["libc-client.a"],"lib-suggests":["openssl"]},qs={source:"jbig","static-libs-unix":["libjbig.a","libjbig85.a"],headers:["jbig.h","jbig85.h","jbig_ar.h"]},Es={source:"ldap","pkg-configs":["ldap","lber"],"lib-depends":["openssl","zlib","gmp","libsodium"]},Cs={source:"lerc","static-libs-unix":["libLerc.a"],"cpp-library":!0},Ws={source:"libacl","static-libs-unix":["libacl.a"],"lib-depends":["attr"]},Ps={source:"libaom","static-libs-unix":["libaom.a"],"cpp-library":!0},Is={source:"libargon2","static-libs-unix":["libargon2.a"]},$s={source:"libavif","static-libs-unix":["libavif.a"],"static-libs-windows":["avif.lib"]},Us={source:"libcares","static-libs-unix":["libcares.a"],"headers-unix":["ares.h","ares_dns.h","ares_nameser.h"]},Ls={source:"libde265","static-libs-unix":["libde265.a"],"cpp-library":!0},js={source:"libevent","static-libs-unix":["libevent.a","libevent_core.a","libevent_extra.a","libevent_openssl.a"],"lib-depends":["openssl"]},Ns={source:"libffi","static-libs-unix":["libffi.a"],"static-libs-windows":["libffi.lib"],"headers-unix":["ffi.h","ffitarget.h"],"headers-windows":["ffi.h","fficonfig.h","ffitarget.h"]},Os={source:"libheif","static-libs-unix":["libheif.a"],"lib-depends":["libde265","libwebp","libaom","zlib","brotli"]},Vs={source:"libiconv","static-libs-unix":["libiconv.a","libcharset.a"],headers:["iconv.h","libcharset.h","localcharset.h"]},As={source:"libjpeg","static-libs-unix":["libjpeg.a","libturbojpeg.a"],"static-libs-windows":["libjpeg_a.lib"],"lib-suggests-windows":["zlib"]},Ts={source:"libjxl","pkg-configs":["libjxl","libjxl_cms","libjxl_threads","libhwy"],"lib-depends":["brotli","libjpeg","libpng","libwebp"]},_s={source:"liblz4","static-libs-unix":["liblz4.a"]},Gs={source:"libmemcached","static-libs-unix":["libmemcached.a","libmemcachedprotocol.a","libmemcachedutil.a","libhashkit.a"]},Xs={source:"libpng","static-libs-unix":["libpng16.a"],"static-libs-windows":["libpng16_static.lib","libpng_a.lib"],"headers-unix":["png.h","pngconf.h","pnglibconf.h"],"headers-windows":["png.h","pngconf.h"],"lib-depends":["zlib"]},Hs={source:"librabbitmq","static-libs-unix":["librabbitmq.a"],"static-libs-windows":["rabbitmq.4.lib"],"lib-depends":["openssl"]},Ms={source:"librdkafka","static-libs-unix":["librdkafka.a","librdkafka++.a","librdkafka-static.a"],"cpp-library":!0,"lib-suggests":["zstd"]},Rs={source:"libsodium","static-libs-unix":["libsodium.a"],"static-libs-windows":["libsodium.lib"]},Fs={source:"libssh2","static-libs-unix":["libssh2.a"],"static-libs-windows":["libssh2.lib"],headers:["libssh2.h","libssh2_publickey.h","libssh2_sftp.h"],"lib-depends":["openssl"]},Zs={source:"libtiff","static-libs-unix":["libtiff.a"],"lib-depends":["zlib","libjpeg"],"lib-suggests-unix":["lerc","libwebp","jbig","xz","zstd"]},Qs={source:"libuuid","static-libs-unix":["libuuid.a"],headers:["uuid/uuid.h"]},Ks={source:"libuv","static-libs-unix":["libuv.a"]},Ys={source:"libwebp","pkg-configs":["libwebp","libwebpdecoder","libwebpdemux","libwebpmux","libsharpyuv"],"static-libs-windows":["libwebp.lib","libwebpdecoder.lib","libwebpdemux.lib","libsharpyuv.lib"]},Js={source:"libxml2","static-libs-unix":["libxml2.a"],"static-libs-windows":["libxml2s.lib","libxml2_a.lib"],headers:["libxml2"],"lib-depends-unix":["libiconv"],"lib-suggests-unix":["xz","icu","zlib"],"lib-depends-windows":["libiconv-win"],"lib-suggests-windows":["zlib"]},et={source:"libxslt","static-libs-unix":["libxslt.a","libexslt.a"],"lib-depends":["libxml2"]},it={source:"libyaml","static-libs-unix":["libyaml.a"],"static-libs-windows":["yaml.lib"],headers:["yaml.h"]},st={source:"libzip","static-libs-unix":["libzip.a"],"static-libs-windows":["zip.lib","libzip_a.lib"],headers:["zip.h","zipconf.h"],"lib-depends-unix":["zlib"],"lib-suggests-unix":["bzip2","xz","zstd","openssl"],"lib-depends-windows":["zlib","bzip2","xz"],"lib-suggests-windows":["zstd","openssl"]},tt={source:"mimalloc","static-libs-unix":["libmimalloc.a"]},lt={source:"ncurses","static-libs-unix":["libncurses.a"]},nt={source:"nghttp2","static-libs-unix":["libnghttp2.a"],"static-libs-windows":["nghttp2.lib"],headers:["nghttp2"],"lib-depends":["zlib","openssl"],"lib-suggests":["libxml2","nghttp3","ngtcp2"]},ot={source:"nghttp3","static-libs-unix":["libnghttp3.a"],"static-libs-windows":["nghttp3.lib"],headers:["nghttp3"],"lib-depends":["openssl"]},at={source:"ngtcp2","static-libs-unix":["libngtcp2.a","libngtcp2_crypto_ossl.a"],"static-libs-windows":["ngtcp2.lib","ngtcp2_crypto_ossl.lib"],headers:["ngtcp2"],"lib-depends":["openssl"],"lib-suggests":["nghttp3","brotli"]},dt={source:"onig","static-libs-unix":["libonig.a"],"static-libs-windows":["onig.lib","onig_a.lib"],headers:["oniggnu.h","oniguruma.h"]},ut={source:"openssl","static-libs-unix":["libssl.a","libcrypto.a"],"static-libs-windows":["libssl.lib","libcrypto.lib"],headers:["openssl"],"lib-depends":["zlib"]},pt={source:"postgresql","pkg-configs":["libpq"],"lib-depends":["libiconv","libxml2","openssl","zlib","readline"],"lib-suggests":["icu","libxslt","ldap","zstd"]},rt={source:"pthreads4w","static-libs-windows":["libpthreadVC3.lib"]},ct={source:"qdbm","static-libs-unix":["libqdbm.a"],"static-libs-windows":["qdbm_a.lib"],"headers-windows":["depot.h"]},bt={source:"readline","static-libs-unix":["libreadline.a"],"lib-depends":["ncurses"]},wt={source:"snappy","static-libs-unix":["libsnappy.a"],"headers-unix":["snappy.h","snappy-c.h","snappy-sinksource.h","snappy-stubs-public.h"],"lib-depends":["zlib"]},gt={source:"sqlite","static-libs-unix":["libsqlite3.a"],"static-libs-windows":["libsqlite3_a.lib"],headers:["sqlite3.h","sqlite3ext.h"]},xt={source:"tidy","static-libs-unix":["libtidy.a"]},ht={source:"unixodbc","static-libs-unix":["libodbc.a","libodbccr.a","libodbcinst.a"],"lib-depends":["libiconv"]},mt={source:"watcher","static-libs-unix":["libwatcher-c.a"],headers:["wtr/watcher-c.h"]},yt={source:"xz","static-libs-unix":["liblzma.a"],"static-libs-windows":["lzma.lib","liblzma_a.lib"],"headers-unix":["lzma"],"headers-windows":["lzma","lzma.h"],"lib-depends-unix":["libiconv"]},vt={source:"zlib","static-libs-unix":["libz.a"],"static-libs-windows":["zlib_a.lib"],headers:["zlib.h","zconf.h"]},ft={source:"zstd","static-libs-unix":["libzstd.a"],"static-libs-windows":[["zstd.lib","zstd_static.lib"]],"headers-unix":["zdict.h","zstd.h","zstd_errors.h"],"headers-windows":["zstd.h","zstd_errors.h"]},zt={"lib-base":{type:"root","lib-depends-unix":["pkg-config"]},php:rs,micro:cs,"pkg-config":{type:"package",source:"pkg-config","bin-unix":["pkg-config"]},attr:bs,brotli:ws,bzip2:gs,curl:xs,fastlz:hs,freetype:ms,gettext:ys,glfw:vs,gmp:fs,gmssl:zs,grpc:Ss,icu:Ds,"icu-static-win":{source:"icu-static-win","static-libs-windows":["icudt.lib","icuin.lib","icuio.lib","icuuc.lib"],"headers-windows":["unicode"]},imagemagick:ks,imap:Bs,jbig:qs,ldap:Es,lerc:Cs,libacl:Ws,libaom:Ps,libargon2:Is,libavif:$s,libcares:Us,libde265:Ls,libevent:js,libffi:Ns,"libffi-win":{source:"libffi-win","static-libs-windows":["libffi.lib"],"headers-windows":["ffi.h","ffitarget.h","fficonfig.h"]},libheif:Os,libiconv:Vs,"libiconv-win":{source:"libiconv-win","static-libs-windows":["libiconv.lib","libiconv_a.lib"]},libjpeg:As,libjxl:Ts,liblz4:_s,libmemcached:Gs,libpng:Xs,librabbitmq:Hs,librdkafka:Ms,libsodium:Rs,libssh2:Fs,libtiff:Zs,libuuid:Qs,libuv:Ks,libwebp:Ys,libxml2:Js,libxslt:et,libyaml:it,libzip:st,mimalloc:tt,ncurses:lt,nghttp2:nt,nghttp3:ot,ngtcp2:at,onig:dt,openssl:ut,postgresql:pt,"postgresql-win":{source:"postgresql-win","static-libs":["libpq.lib","libpgport.lib","libpgcommon.lib"]},pthreads4w:rt,qdbm:ct,readline:bt,snappy:wt,sqlite:gt,tidy:xt,unixodbc:ht,watcher:mt,xz:yt,zlib:vt,zstd:ft};function U(i,l,u,d){return i.os==="linux"?i[l][u][d+"-linux"]??i[l][u][d+"-unix"]??i[l][u][d]??[]:i.os==="macos"?i[l][u][d+"-macos"]??i[l][u][d+"-unix"]??i[l][u][d]??[]:i.os==="windows"?i[l][u][d+"-windows"]??i[l][u][d]??[]:[]}function J(i,l){return U(i,"ext",l,"ext-depends")}function St(i,l){return U(i,"ext",l,"ext-suggests")}function Dt(i,l){return U(i,"ext",l,"lib-depends")}function kt(i,l){return U(i,"ext",l,"lib-suggests")}function ee(i,l){return U(i,"lib",l,"lib-depends")}function Bt(i,l){return U(i,"lib",l,"lib-suggests")}function qt(i,l){const u=[],d=new Set,m=[];l.forEach(D=>{d.has(D)||Wt(i,D,d,u)});const S=[];return u.forEach(D=>{l.indexOf(D)===-1&&m.push(D),[...Dt(i,D),...kt(i,D)].forEach(o=>{S.indexOf(o)===-1&&S.push(o)})}),{exts:u,libs:Et(i,S),notIncludedExts:m}}function Et(i,l){const u=[],d=new Set;return l.forEach(m=>{d.has(m)||(console.log("before visited"),console.log(d),Ct(i,m,d,u),console.log("after visited"),console.log(d))}),u}function Ct(i,l,u,d){if(u.has(l))return;u.add(l),[...ee(i,l),...Bt(i,l)].forEach(S=>{ie(i,S,u,d)}),d.push(l)}function ie(i,l,u,d){u.has(l)||(u.add(l),ee(i,l).forEach(m=>{ie(i,m,u,d)}),d.push(l))}function se(i,l,u,d){u.has(u)||(u.add(l),J(i,l).forEach(m=>{se(i,m,u,d)}),d.push(l))}function Wt(i,l,u,d){if(u.has(l))return;u.add(l),[...J(i,l),...St(i,l)].forEach(S=>{se(i,S,u,d)}),d.push(l)}const Pt={class:"option-line"},It=["id","value","disabled"],$t=["for"],Ut={class:"option-line"},Lt=["disabled"],jt={class:"box"},Nt={class:"ext-item"},Ot=["id","value","disabled"],Vt=["for"],At={style:{color:"orangered","font-weight":"bolder"}},Tt={class:"details custom-block",open:""},_t={class:"box"},Gt={class:"ext-item"},Xt=["id","value","disabled"],Ht=["for"],Mt={class:"tip custom-block"},Rt={class:"box"},Ft={class:"ext-item"},Zt=["id","value"],Qt=["for"],Kt={key:2,class:"warning custom-block"},Yt={key:3,class:"warning custom-block"},Jt={value:"native"},el={value:"spc"},il={key:0,value:"docker"},sl=["value"],tl={for:"debug-yes"},ll={for:"debug-no"},nl={for:"zts-yes"},ol={for:"zts-no"},al={for:"show-download-yes"},dl={for:"show-download-no"},ul={for:"pre-built-yes"},pl={for:"pre-built-no"},rl={key:0},cl={for:"upx-yes"},bl={for:"upx-no"},wl=["placeholder"],gl={key:4,class:"command-container"},xl={key:0,class:"command-preview"},hl={key:1},ml={class:"warning custom-block"},yl={key:5,class:"command-container"},vl={id:"download-ext-cmd",class:"command-preview"},fl={key:6,class:"command-container"},zl={id:"download-all-cmd",class:"command-preview"},Sl={key:7,class:"command-container"},Dl={id:"download-pkg-cmd",class:"command-preview"},kl={class:"command-container"},Bl={id:"build-cmd",class:"command-preview"},ql={class:"command-container"},El={id:"craft-cmd",class:"command-preview pre"},Cl={name:"CliGenerator"},Wl=ge({...Cl,props:{lang:{type:String,default:"zh"}},setup(i){const l=w(ps),u=z(()=>{const a=[];for(const[s,t]of Object.entries(l.value))D(s,r.value)&&a.push(s);return a}),d=w(zt),m=w([]),S=[{os:"linux",label:"Linux",disabled:!1},{os:"macos",label:"macOS",disabled:!1},{os:"windows",label:"Windows",disabled:!1}],D=(a,s)=>{var b,E;const c=new Map([["linux","Linux"],["macos","Darwin"],["windows","Windows"]]).get(s),p=((E=(b=l.value[a])==null?void 0:b.support)==null?void 0:E[c])??"yes";return p==="yes"||p==="partial"},Q=["8.0","8.1","8.2","8.3","8.4"],o={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建(Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectAll:"选择全部",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini,每行写一个,例如:memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTips:"选择扩展后,不可选中的项目为必需的依赖,编译的依赖库列表中可选的为现有扩展和依赖库的可选依赖。选择可选依赖后,将生成 --with-libs 参数。",depTips2:"无法同时构建所有扩展,因为有些扩展之间相互冲突。请根据需要选择扩展。",microUnavailable:"micro 不支持 PHP 7.4 及更早版本!",windowsSAPIUnavailable:"Windows 目前不支持 fpm、embed 构建!",useUPX:"是否开启 UPX 压缩(减小二进制体积)",windowsDownSPCWarning:"Windows 下请手动下载 spc.exe 二进制文件,解压到当前目录并重命名为 spc.exe!",usePreBuilt:"如果可能,下载预编译的依赖库(减少编译时间)"},en:{selectExt:"Select Extensions",buildTarget:"Build Target",buildOptions:"Build Options",buildEnvironment:"Build Environment",buildEnvNative:"Native build (Git source code)",buildEnvSpc:"Native build (standalone spc binary)",buildEnvDocker:"Alpine docker build",useDebug:"Enable debug message",yes:"Yes",no:"No",resultShow:"Result",selectCommon:"Select common extensions",selectAll:"Select all",selectNone:"Unselect all",useZTS:"Enable ZTS",hardcodedINI:"Hardcoded INI options",hardcodedINIPlacehoder:"If you need to hardcode ini, write one per line, for example: memory_limit=2G",resultShowDownload:"Download with corresponding extension dependencies",downloadExtOnlyCommand:"Download sources by extensions command",downloadAllCommand:"Download all sources command",downloadUPXCommand:"Download UPX command",compileCommand:"Compile command",downloadPhpVersion:"Download PHP version",downloadSPCBinaryCommand:"Download spc binary command",selectedArch:"Select build architecture",selectedSystem:"Select Build OS",buildLibs:"Select Dependencies",depTips:"After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.",depTips2:"It is not possible to build all extensions at the same time, as some extensions conflict with each other. Please select the extensions you need.",microUnavailable:"Micro does not support PHP 7.4 and earlier versions!",windowsSAPIUnavailable:"Windows does not support fpm and embed build!",useUPX:"Enable UPX compression (reduce binary size)",windowsDownSPCWarning:"Please download the binary file manually, extract it to the current directory and rename to spc.exe on Windows!",usePreBuilt:"Download pre-built dependencies if possible (reduce compile time)"}},te=["cli","fpm","micro","embed","all"],le=()=>{y.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},ne=()=>{y.value=u.value},G=z(()=>y.value.join(",")),X=z(()=>{const a=B.value.filter(s=>O.value.indexOf(s)===-1);return a.length>0?' --with-libs="'+a.join(",")+'"':""}),y=w([]),B=w([]),H=w([]),O=w([]),v=w(["cli"]),V=w("spc"),I=w("8.4"),k=w(0),$=w(0),L=w(1),W=w(1),q=w(0),M=w(""),r=w("linux");_(r,()=>{r.value==="windows"&&(A.value="x86_64")});const A=w("x86_64"),T=z(()=>{switch(V.value){case"native":return"bin/spc";case"spc":return r.value==="windows"?".\\spc.exe":"./spc";case"docker":return"bin/spc-alpine-docker";default:return""}}),K=w("--build-cli"),oe=z(()=>{const a=M.value.split(` +`);let s=[];return a.forEach(t=>{t.indexOf("=")>=1&&s.push(t)})," "+s.map(t=>'-I "'+t+'"').join(" ")}),P=w(""),R=(a,s)=>a.includes(P.value)?s===0?a.substring(0,a.indexOf(P.value)):s===1?P.value:a.substring(a.indexOf(P.value)+P.value.length):s===0?a:"",ae=a=>{let s;v.value.indexOf("all")!==-1&&a.target.value==="all"?v.value=["all"]:(s=v.value.indexOf("all"))!==-1&&a.target.value!=="all"&&v.value.splice(s,1),K.value=v.value.map(t=>"--build-"+t).join(" ")},de=a=>{const s=new Set,t=c=>{let p=[];if(r.value==="linux"){if(p=l.value[c]["ext-depends-linux"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="macos"){if(p=l.value[c]["ext-depends-macos"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="windows"&&(p=l.value[c]["ext-depends-windows"]??l.value[c]["ext-depends"]??[],p.length===0))return;p.forEach(b=>{s.add(b),t(b)})};return a.forEach(c=>{t(c)}),Array.from(s)},ue=z(()=>`${T.value} download --all --with-php=${I.value}${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=z(()=>`${T.value} download --with-php=${I.value} --for-extensions "${G.value}"${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),re=z(()=>`${T.value} install-pkg upx${k.value?" --debug":""}`),ce=z(()=>`${T.value} build ${K.value} "${G.value}"${X.value}${k.value?" --debug":""}${$.value?" --enable-zts":""}${q.value?" --with-upx-pack":""}${oe.value}`),be=z(()=>{let a=`php-version: ${I.value} +`;return a+=`extensions: "${G.value}" +`,v.value.join(",")==="all"?a+="sapi: "+["cli","fpm","micro","embed"].join(",")+` +`:a+=`sapi: ${v.value.join(",")} +`,X.value&&(a+=`libs: ${X.value.replace('--with-libs="',"").replace('"',"").trim()} +`),k.value&&(a+=`debug: true +`),a+="{{position_hold}}",q.value&&(a+=` with-upx-pack: true +`),$.value&&(a+=` enable-zts: true +`),W.value&&(a+=` prefer-pre-built: true +`),a.endsWith("{{position_hold}}")?a=a.replace("{{position_hold}}",""):a=a.replace("{{position_hold}}",`build-options: +`),a}),we=a=>{const s=new Set,t=p=>{let b=[];if(r.value==="linux"){if(b=d.value[p]["lib-depends-linux"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=d.value[p]["lib-depends-macos"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=d.value[p]["lib-depends-windows"]??d.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})},c=p=>{let b=[];if(r.value==="linux"){if(b=l.value[p]["lib-depends-linux"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=l.value[p]["lib-depends-macos"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=l.value[p]["lib-depends-windows"]??l.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})};return a.forEach(p=>{c(p)}),Array.from(s)};return _(r,()=>y.value=[]),_(r,()=>q.value=0),_(y,a=>{H.value=de(a),H.value.forEach(t=>{y.value.indexOf(t)===-1&&y.value.push(t)}),y.value.sort(),console.log("检测到变化!"),console.log(a);const s=qt({ext:l.value,lib:d.value,os:r.value},y.value);m.value=s.libs.sort(),B.value=[],O.value=we(s.exts),O.value.forEach(t=>{B.value.indexOf(t)===-1&&B.value.push(t)})}),(a,s)=>(x(),g("div",null,[e("h2",null,n(o[i.lang].selectedSystem),1),e("div",Pt,[(x(),g(j,null,N(S,(t,c)=>e("span",{key:c,style:{"margin-right":"8px"}},[h(e("input",{type:"radio",id:"os-"+t.os,value:t.os,disabled:t.disabled===!0,"onUpdate:modelValue":s[0]||(s[0]=p=>r.value=p)},null,8,It),[[f,r.value]]),e("label",{for:"os-"+t.os},n(t.label),9,$t)])),64))]),e("div",Ut,[h(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>A.value=t)},[s[20]||(s[20]=e("option",{value:"x86_64"},"x86_64",-1)),e("option",{value:"aarch64",disabled:r.value==="windows"},"aarch64",8,Lt)],512),[[F,A.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",jt,[h(e("input",{class:"input","onUpdate:modelValue":s[2]||(s[2]=t=>P.value=t),placeholder:"Highlight search..."},null,512),[[Y,P.value]]),s[21]||(s[21]=e("br",null,null,-1)),(x(!0),g(j,null,N(u.value,t=>(x(),g("div",Nt,[e("span",null,[h(e("input",{type:"checkbox",id:t,value:t,"onUpdate:modelValue":s[3]||(s[3]=c=>y.value=c),disabled:H.value.indexOf(t)!==-1},null,8,Ot),[[Z,y.value]]),e("label",{for:t},[e("span",null,n(R(t,0)),1),e("span",At,n(R(t,1)),1),e("span",null,n(R(t,2)),1)],8,Vt)])]))),256))]),r.value!=="windows"?(x(),g("div",{key:0,class:"my-btn",onClick:le},n(o[i.lang].selectCommon),1)):C("",!0),r.value!=="windows"?(x(),g("div",{key:1,class:"my-btn",onClick:ne},n(o[i.lang].selectAll),1)):C("",!0),e("div",{class:"my-btn",onClick:s[4]||(s[4]=t=>y.value=[])},n(o[i.lang].selectNone),1),e("details",Tt,[e("summary",null,n(o[i.lang].buildLibs)+n(B.value.length>0?" ("+B.value.length+")":""),1),e("div",_t,[(x(!0),g(j,null,N(m.value,(t,c)=>(x(),g("div",Gt,[h(e("input",{type:"checkbox",id:c,value:t,"onUpdate:modelValue":s[5]||(s[5]=p=>B.value=p),disabled:O.value.indexOf(t)!==-1},null,8,Xt),[[Z,B.value]]),e("label",{for:c},n(t),9,Ht)]))),256))])]),e("div",Mt,[s[22]||(s[22]=e("p",{class:"custom-block-title"},"TIP",-1)),e("p",null,n(o[i.lang].depTips),1),e("p",null,n(o[i.lang].depTips2),1)]),e("h2",null,n(o[i.lang].buildTarget),1),e("div",Rt,[(x(),g(j,null,N(te,t=>e("div",Ft,[h(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":s[6]||(s[6]=c=>v.value=c),onChange:ae},null,40,Zt),[[Z,v.value]]),e("label",{for:"build_"+t},n(t),9,Qt)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(x(),g("div",Kt,[s[23]||(s[23]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].microUnavailable),1)])):C("",!0),r.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(x(),g("div",Yt,[s[24]||(s[24]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].windowsSAPIUnavailable),1)])):C("",!0),e("h2",null,n(o[i.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,n(o[i.lang].buildEnvironment),1),e("td",null,[h(e("select",{"onUpdate:modelValue":s[7]||(s[7]=t=>V.value=t)},[e("option",Jt,n(o[i.lang].buildEnvNative),1),e("option",el,n(o[i.lang].buildEnvSpc),1),r.value!=="windows"?(x(),g("option",il,n(o[i.lang].buildEnvDocker),1)):C("",!0)],512),[[F,V.value]])])]),e("tr",null,[e("td",null,n(o[i.lang].downloadPhpVersion),1),e("td",null,[h(e("select",{"onUpdate:modelValue":s[8]||(s[8]=t=>I.value=t)},[(x(),g(j,null,N(Q,t=>e("option",{value:t},n(t),9,sl)),64))],512),[[F,I.value]])])]),e("tr",null,[e("td",null,n(o[i.lang].useDebug),1),e("td",null,[h(e("input",{type:"radio",id:"debug-yes",value:1,"onUpdate:modelValue":s[9]||(s[9]=t=>k.value=t)},null,512),[[f,k.value]]),e("label",tl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"debug-no",value:0,"onUpdate:modelValue":s[10]||(s[10]=t=>k.value=t)},null,512),[[f,k.value]]),e("label",ll,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].useZTS),1),e("td",null,[h(e("input",{type:"radio",id:"zts-yes",value:1,"onUpdate:modelValue":s[11]||(s[11]=t=>$.value=t)},null,512),[[f,$.value]]),e("label",nl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"zts-no",value:0,"onUpdate:modelValue":s[12]||(s[12]=t=>$.value=t)},null,512),[[f,$.value]]),e("label",ol,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].resultShowDownload),1),e("td",null,[h(e("input",{type:"radio",id:"show-download-yes",value:1,"onUpdate:modelValue":s[13]||(s[13]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",al,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"show-download-no",value:0,"onUpdate:modelValue":s[14]||(s[14]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",dl,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].usePreBuilt),1),e("td",null,[h(e("input",{type:"radio",id:"pre-built-yes",value:1,"onUpdate:modelValue":s[15]||(s[15]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",ul,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"pre-built-no",value:0,"onUpdate:modelValue":s[16]||(s[16]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",pl,n(o[i.lang].no),1)])]),r.value!=="macos"?(x(),g("tr",rl,[e("td",null,n(o[i.lang].useUPX),1),e("td",null,[h(e("input",{type:"radio",id:"upx-yes",value:1,"onUpdate:modelValue":s[17]||(s[17]=t=>q.value=t)},null,512),[[f,q.value]]),e("label",cl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"upx-no",value:0,"onUpdate:modelValue":s[18]||(s[18]=t=>q.value=t)},null,512),[[f,q.value]]),e("label",bl,n(o[i.lang].no),1)])])):C("",!0)]),e("h2",null,n(o[i.lang].hardcodedINI),1),h(e("textarea",{class:"textarea",placeholder:o[i.lang].hardcodedINIPlacehoder,"onUpdate:modelValue":s[19]||(s[19]=t=>M.value=t),rows:"5"},null,8,wl),[[Y,M.value]]),e("h2",null,n(o[i.lang].resultShow),1),V.value==="spc"?(x(),g("div",gl,[e("b",null,n(o[i.lang].downloadSPCBinaryCommand),1),r.value!=="windows"?(x(),g("div",xl,[xe(" curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-"+n(r.value)+"-"+n(A.value)+".tar.gz && tar -zxvf spc.tgz && rm spc.tgz",1),s[25]||(s[25]=e("br",null,null,-1))])):(x(),g("div",hl,[e("div",ml,[s[26]||(s[26]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].windowsDownSPCWarning),1),s[27]||(s[27]=e("a",{href:"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",target:"_blank"},"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",-1))])]))])):C("",!0),L.value?(x(),g("div",yl,[e("b",null,n(o[i.lang].downloadExtOnlyCommand),1),e("div",vl,n(pe.value),1)])):(x(),g("div",fl,[e("b",null,n(o[i.lang].downloadAllCommand),1),e("div",zl,n(ue.value),1)])),q.value?(x(),g("div",Sl,[e("b",null,n(o[i.lang].downloadUPXCommand),1),e("div",Dl,n(re.value),1)])):C("",!0),e("div",kl,[e("b",null,n(o[i.lang].compileCommand),1),e("div",Bl,n(ce.value),1)]),e("div",ql,[s[28]||(s[28]=e("b",null,"craft.yml",-1)),e("div",El,n(be.value),1)])]))}}),Il=he(Wl,[["__scopeId","data-v-520722c6"]]);export{Il as C}; diff --git a/assets/chunks/CliGenerator.DsOXoVZF.js b/assets/chunks/CliGenerator.DsOXoVZF.js deleted file mode 100644 index d316a8c1..00000000 --- a/assets/chunks/CliGenerator.DsOXoVZF.js +++ /dev/null @@ -1,12 +0,0 @@ -import{d as ge,x as w,h as z,z as _,c as g,o as x,j as e,e as C,ag as h,t as n,G as j,H as N,ah as f,ai as F,aj as Y,ak as Z,a as xe,_ as he}from"./framework.PeLcR_tw.js";const me={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ye={type:"external",source:"apcu"},ve={type:"external",source:"ast"},fe={type:"builtin"},ze={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},Se={type:"builtin","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["bzip2"]},De={type:"builtin"},ke={type:"builtin"},Be={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},qe={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},Ee={support:{BSD:"wip"},type:"external",source:"dio"},Ce={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},We={type:"external",source:"ext-ds"},Pe={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ie={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},$e={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Ue={type:"builtin"},Le={support:{Linux:"partial",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},je={type:"builtin"},Ne={type:"builtin"},Oe={type:"builtin","lib-suggests":["openssl"]},Ve={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ae={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gettext"]},Te={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},_e={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},Ge={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},He={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Me={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Re={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Fe={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Ze={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Qe={support:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},Ke={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ye={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],target:["static"]},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ei={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},ii={type:"builtin","arg-type":"custom"},si={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},ti={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"lib-depends-unix":["libmemcached","fastlz"],"ext-depends":["session","zlib"]},ni={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"],frameworks:["CoreFoundation","Security"]},oi={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable","ext-depends":["session"]},ai={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},di={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},ui={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},pi={support:{BSD:"wip",Windows:"wip"},type:"builtin","arg-type-unix":"custom","lib-depends-unix":["unixodbc"]},ri={type:"builtin","arg-type-unix":"custom","zend-extension":!0},ci={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},bi={support:{BSD:"wip"},type:"external",source:"opentelemetry"},wi={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},gi={support:{Windows:"no"},type:"builtin","unix-only":!0},xi={type:"builtin"},hi={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},mi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends-unix":["unixodbc"],"ext-depends":["pdo","odbc"]},yi={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"custom","ext-depends":["pdo","pgsql"],"lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},vi={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},fi={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},zi={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},Si={type:"builtin","ext-depends":["zlib"]},Di={support:{Windows:"no"},type:"builtin","unix-only":!0},ki={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},Bi={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},qi={support:{BSD:"wip",Windows:"wip"},type:"external",source:"ext-rdkafka","arg-type":"custom","cpp-extension":!0,"lib-depends":["librdkafka"]},Ei={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["readline"],target:["static"]},Ci={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},Wi={type:"builtin","build-with-php":!0},Pi={type:"builtin","build-with-php":!0},Ii={type:"external",source:"ext-simdjson","cpp-extension":!0},$i={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},Ui={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},Li={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},ji={type:"builtin"},Ni={support:{BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},Oi={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Vi={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends":["sqlite"]},Ai={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Ti={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-path","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends":["openssl","zlib"]},_i={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},Gi={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},Xi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Hi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Mi={support:{BSD:"wip"},type:"builtin"},Ri={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["tidy"]},Fi={type:"builtin","build-with-php":!0},Zi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-path","lib-depends":["libuuid"]},Qi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-path","lib-depends":["libuv"],"ext-depends":["sockets"]},Ki={type:"external",source:"xdebug",target:["shared"],support:{Windows:"wip",BSD:"no",Darwin:"partial",Linux:"partial"},notes:!0,"zend-extension":!0},Yi={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"],"build-with-php":!0},Ji={support:{BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},es={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"],"build-with-php":!0},is={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"],"build-with-php":!0},ss={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},ts={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},ls={type:"external",source:"ext-xz","arg-type":"with","lib-depends":["xz"]},ns={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","lib-depends-unix":["fastlz"],"ext-depends-unix":["igbinary"]},os={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["libyaml"]},as={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},ds={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"],target:["static"]},us={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},ps={amqp:me,apcu:ye,ast:ve,bcmath:fe,brotli:ze,bz2:Se,calendar:De,ctype:ke,curl:Be,dba:qe,dio:Ee,dom:Ce,ds:We,enchant:Pe,ev:Ie,event:$e,exif:Ue,ffi:Le,fileinfo:je,filter:Ne,ftp:Oe,gd:Ve,gettext:Ae,glfw:Te,gmp:_e,gmssl:Ge,grpc:Xe,iconv:He,igbinary:Me,imagick:Re,imap:Fe,inotify:Ze,intl:Qe,ldap:Ke,libxml:Ye,lz4:Je,mbregex:ei,mbstring:ii,mcrypt:si,memcache:ti,memcached:li,mongodb:ni,msgpack:oi,mysqli:ai,mysqlnd:di,oci8:ui,odbc:pi,opcache:ri,openssl:ci,opentelemetry:bi,parallel:wi,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-path","lib-depends":["libargon2"]},pcntl:gi,pdo:xi,pdo_mysql:hi,pdo_odbc:mi,pdo_pgsql:yi,pdo_sqlite:vi,pdo_sqlsrv:fi,pgsql:zi,phar:Si,posix:Di,protobuf:ki,rar:Bi,rdkafka:qi,readline:Ei,redis:Ci,session:Wi,shmop:Pi,simdjson:Ii,simplexml:$i,snappy:Ui,soap:Li,sockets:ji,sodium:Ni,spx:Oi,sqlite3:Vi,sqlsrv:Ai,ssh2:Ti,swoole:_i,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:Gi,sysvmsg:Xi,sysvsem:Hi,sysvshm:Mi,tidy:Ri,tokenizer:Fi,uuid:Zi,uv:Qi,xdebug:Ki,xhprof:Yi,xlswriter:Ji,xml:es,xmlreader:is,xmlwriter:ss,xsl:ts,xz:ls,yac:ns,yaml:os,zip:as,zlib:ds,zstd:us},rs={type:"root",source:"php-src","lib-depends":["lib-base","micro"],"lib-suggests-linux":["libacl"]},cs={type:"target",source:"micro"},bs={source:"attr","static-libs-unix":["libattr.a"]},ws={source:"brotli","pkg-configs":["libbrotlicommon","libbrotlidec","libbrotlienc"],"static-libs-windows":["brotlicommon.lib","brotlienc.lib","brotlidec.lib"],headers:["brotli"]},gs={source:"bzip2","static-libs-unix":["libbz2.a"],"static-libs-windows":["libbz2.lib","libbz2_a.lib"],headers:["bzlib.h"]},xs={source:"curl","static-libs-unix":["libcurl.a"],"static-libs-windows":["libcurl_a.lib"],headers:["curl"],"lib-depends-unix":["openssl","zlib"],"lib-depends-windows":["zlib","libssh2","nghttp2"],"lib-suggests-unix":["libssh2","brotli","nghttp2","nghttp3","ngtcp2","zstd","libcares","ldap"],"lib-suggests-windows":["brotli","zstd"],frameworks:["CoreFoundation","CoreServices","SystemConfiguration"]},hs={source:"fastlz","static-libs-unix":["libfastlz.a"],headers:["fastlz/fastlz.h"]},ms={source:"freetype","static-libs-unix":["libfreetype.a"],"static-libs-windows":["libfreetype_a.lib"],"headers-unix":["freetype2/freetype/freetype.h","freetype2/ft2build.h"],"lib-depends":["zlib"],"lib-suggests":["libpng","bzip2","brotli"]},ys={source:"gettext","static-libs-unix":["libintl.a"],"lib-depends":["libiconv"],"lib-suggests":["ncurses","libxml2"],frameworks:["CoreFoundation"]},vs={source:"ext-glfw","static-libs-unix":["libglfw3.a"],frameworks:["CoreVideo","OpenGL","Cocoa","IOKit"]},fs={source:"gmp","static-libs-unix":["libgmp.a"],"static-libs-windows":["libgmp.lib"],headers:["gmp.h"]},zs={source:"gmssl","static-libs-unix":["libgmssl.a"],"static-libs-windows":["gmssl.lib"],frameworks:["Security"]},Ss={source:"grpc","pkg-configs":["grpc"],"lib-depends":["zlib","openssl","libcares"],"provide-pre-built":!0,frameworks:["CoreFoundation"]},Ds={source:"icu","cpp-library":!0,"pkg-configs":["icu-uc","icu-i18n","icu-io"]},ks={source:"imagemagick","pkg-configs":["Magick++-7.Q16HDRI","MagickCore-7.Q16HDRI","MagickWand-7.Q16HDRI"],"lib-depends":["zlib","libjpeg","libjxl","libpng","libwebp","freetype","libtiff","libheif","bzip2"],"lib-suggests":["zstd","xz","libzip","libxml2"]},Bs={source:"imap","static-libs-unix":["libc-client.a"],"lib-suggests":["openssl"]},qs={source:"jbig","static-libs-unix":["libjbig.a","libjbig85.a"],headers:["jbig.h","jbig85.h","jbig_ar.h"]},Es={source:"ldap","pkg-configs":["ldap","lber"],"lib-depends":["openssl","zlib","gmp","libsodium"]},Cs={source:"lerc","static-libs-unix":["libLerc.a"],"cpp-library":!0},Ws={source:"libacl","static-libs-unix":["libacl.a"],"lib-depends":["attr"]},Ps={source:"libaom","static-libs-unix":["libaom.a"],"cpp-library":!0},Is={source:"libargon2","static-libs-unix":["libargon2.a"]},$s={source:"libavif","static-libs-unix":["libavif.a"],"static-libs-windows":["avif.lib"]},Us={source:"libcares","static-libs-unix":["libcares.a"],"headers-unix":["ares.h","ares_dns.h","ares_nameser.h"]},Ls={source:"libde265","static-libs-unix":["libde265.a"],"cpp-library":!0},js={source:"libevent","static-libs-unix":["libevent.a","libevent_core.a","libevent_extra.a","libevent_openssl.a"],"lib-depends":["openssl"]},Ns={source:"libffi","static-libs-unix":["libffi.a"],"static-libs-windows":["libffi.lib"],"headers-unix":["ffi.h","ffitarget.h"],"headers-windows":["ffi.h","fficonfig.h","ffitarget.h"]},Os={source:"libheif","static-libs-unix":["libheif.a"],"lib-depends":["libde265","libwebp","libaom","zlib","brotli"]},Vs={source:"libiconv","static-libs-unix":["libiconv.a","libcharset.a"],headers:["iconv.h","libcharset.h","localcharset.h"]},As={source:"libjpeg","static-libs-unix":["libjpeg.a","libturbojpeg.a"],"static-libs-windows":["libjpeg_a.lib"],"lib-suggests-windows":["zlib"]},Ts={source:"libjxl","pkg-configs":["libjxl","libjxl_cms","libjxl_threads","libhwy"],"lib-depends":["brotli","libjpeg","libpng","libwebp"]},_s={source:"liblz4","static-libs-unix":["liblz4.a"]},Gs={source:"libmemcached","static-libs-unix":["libmemcached.a","libmemcachedprotocol.a","libmemcachedutil.a","libhashkit.a"]},Xs={source:"libpng","static-libs-unix":["libpng16.a"],"static-libs-windows":["libpng16_static.lib","libpng_a.lib"],"headers-unix":["png.h","pngconf.h","pnglibconf.h"],"headers-windows":["png.h","pngconf.h"],"lib-depends":["zlib"]},Hs={source:"librabbitmq","static-libs-unix":["librabbitmq.a"],"static-libs-windows":["rabbitmq.4.lib"],"lib-depends":["openssl"]},Ms={source:"librdkafka","static-libs-unix":["librdkafka.a","librdkafka++.a","librdkafka-static.a"],"cpp-library":!0,"lib-suggests":["zstd"]},Rs={source:"libsodium","static-libs-unix":["libsodium.a"],"static-libs-windows":["libsodium.lib"]},Fs={source:"libssh2","static-libs-unix":["libssh2.a"],"static-libs-windows":["libssh2.lib"],headers:["libssh2.h","libssh2_publickey.h","libssh2_sftp.h"],"lib-depends":["openssl"]},Zs={source:"libtiff","static-libs-unix":["libtiff.a"],"lib-depends":["zlib","libjpeg"],"lib-suggests-unix":["lerc","libwebp","jbig","xz","zstd"]},Qs={source:"libuuid","static-libs-unix":["libuuid.a"],headers:["uuid/uuid.h"]},Ks={source:"libuv","static-libs-unix":["libuv.a"]},Ys={source:"libwebp","pkg-configs":["libwebp","libwebpdecoder","libwebpdemux","libwebpmux","libsharpyuv"],"static-libs-windows":["libwebp.lib","libwebpdecoder.lib","libwebpdemux.lib","libsharpyuv.lib"]},Js={source:"libxml2","static-libs-unix":["libxml2.a"],"static-libs-windows":["libxml2s.lib","libxml2_a.lib"],headers:["libxml2"],"lib-depends-unix":["libiconv"],"lib-suggests-unix":["xz","icu","zlib"],"lib-depends-windows":["libiconv-win"],"lib-suggests-windows":["zlib"]},et={source:"libxslt","static-libs-unix":["libxslt.a","libexslt.a"],"lib-depends":["libxml2"]},it={source:"libyaml","static-libs-unix":["libyaml.a"],"static-libs-windows":["yaml.lib"],headers:["yaml.h"]},st={source:"libzip","static-libs-unix":["libzip.a"],"static-libs-windows":["zip.lib","libzip_a.lib"],headers:["zip.h","zipconf.h"],"lib-depends-unix":["zlib"],"lib-suggests-unix":["bzip2","xz","zstd","openssl"],"lib-depends-windows":["zlib","bzip2","xz"],"lib-suggests-windows":["zstd","openssl"]},tt={source:"mimalloc","static-libs-unix":["mimalloc.o"]},lt={source:"ncurses","static-libs-unix":["libncurses.a"]},nt={source:"nghttp2","static-libs-unix":["libnghttp2.a"],"static-libs-windows":["nghttp2.lib"],headers:["nghttp2"],"lib-depends":["zlib","openssl"],"lib-suggests":["libxml2","nghttp3","ngtcp2"]},ot={source:"nghttp3","static-libs-unix":["libnghttp3.a"],"static-libs-windows":["nghttp3.lib"],headers:["nghttp3"],"lib-depends":["openssl"]},at={source:"ngtcp2","static-libs-unix":["libngtcp2.a","libngtcp2_crypto_ossl.a"],"static-libs-windows":["ngtcp2.lib","ngtcp2_crypto_ossl.lib"],headers:["ngtcp2"],"lib-depends":["openssl"],"lib-suggests":["nghttp3","brotli"]},dt={source:"onig","static-libs-unix":["libonig.a"],"static-libs-windows":["onig.lib","onig_a.lib"],headers:["oniggnu.h","oniguruma.h"]},ut={source:"openssl","static-libs-unix":["libcrypto.a","libssl.a"],"static-libs-windows":["libssl.lib","libcrypto.lib"],headers:["openssl"],"lib-depends":["zlib"]},pt={source:"postgresql","pkg-configs":["libpq"],"lib-depends":["libiconv","libxml2","openssl","zlib","readline"],"lib-suggests":["icu","libxslt","ldap","zstd"]},rt={source:"pthreads4w","static-libs-windows":["libpthreadVC3.lib"]},ct={source:"qdbm","static-libs-unix":["libqdbm.a"],"static-libs-windows":["qdbm_a.lib"],"headers-windows":["depot.h"]},bt={source:"readline","static-libs-unix":["libreadline.a"],"lib-depends":["ncurses"]},wt={source:"snappy","static-libs-unix":["libsnappy.a"],"headers-unix":["snappy.h","snappy-c.h","snappy-sinksource.h","snappy-stubs-public.h"],"lib-depends":["zlib"]},gt={source:"sqlite","static-libs-unix":["libsqlite3.a"],"static-libs-windows":["libsqlite3_a.lib"],headers:["sqlite3.h","sqlite3ext.h"]},xt={source:"tidy","static-libs-unix":["libtidy.a"]},ht={source:"unixodbc","static-libs-unix":["libodbc.a","libodbccr.a","libodbcinst.a"],"lib-depends":["libiconv"]},mt={source:"watcher","static-libs-unix":["libwatcher-c.a"],headers:["wtr/watcher-c.h"]},yt={source:"xz","static-libs-unix":["liblzma.a"],"static-libs-windows":["lzma.lib","liblzma_a.lib"],"headers-unix":["lzma"],"headers-windows":["lzma","lzma.h"],"lib-depends-unix":["libiconv"]},vt={source:"zlib","static-libs-unix":["libz.a"],"static-libs-windows":["zlib_a.lib"],headers:["zlib.h","zconf.h"]},ft={source:"zstd","static-libs-unix":["libzstd.a"],"static-libs-windows":[["zstd.lib","zstd_static.lib"]],"headers-unix":["zdict.h","zstd.h","zstd_errors.h"],"headers-windows":["zstd.h","zstd_errors.h"]},zt={"lib-base":{type:"root","lib-depends-unix":["pkg-config"]},php:rs,micro:cs,"pkg-config":{type:"package",source:"pkg-config","bin-unix":["pkg-config"]},attr:bs,brotli:ws,bzip2:gs,curl:xs,fastlz:hs,freetype:ms,gettext:ys,glfw:vs,gmp:fs,gmssl:zs,grpc:Ss,icu:Ds,"icu-static-win":{source:"icu-static-win","static-libs-windows":["icudt.lib","icuin.lib","icuio.lib","icuuc.lib"],"headers-windows":["unicode"]},imagemagick:ks,imap:Bs,jbig:qs,ldap:Es,lerc:Cs,libacl:Ws,libaom:Ps,libargon2:Is,libavif:$s,libcares:Us,libde265:Ls,libevent:js,libffi:Ns,"libffi-win":{source:"libffi-win","static-libs-windows":["libffi.lib"],"headers-windows":["ffi.h","ffitarget.h","fficonfig.h"]},libheif:Os,libiconv:Vs,"libiconv-win":{source:"libiconv-win","static-libs-windows":["libiconv.lib","libiconv_a.lib"]},libjpeg:As,libjxl:Ts,liblz4:_s,libmemcached:Gs,libpng:Xs,librabbitmq:Hs,librdkafka:Ms,libsodium:Rs,libssh2:Fs,libtiff:Zs,libuuid:Qs,libuv:Ks,libwebp:Ys,libxml2:Js,libxslt:et,libyaml:it,libzip:st,mimalloc:tt,ncurses:lt,nghttp2:nt,nghttp3:ot,ngtcp2:at,onig:dt,openssl:ut,postgresql:pt,"postgresql-win":{source:"postgresql-win","static-libs":["libpq.lib","libpgport.lib","libpgcommon.lib"]},pthreads4w:rt,qdbm:ct,readline:bt,snappy:wt,sqlite:gt,tidy:xt,unixodbc:ht,watcher:mt,xz:yt,zlib:vt,zstd:ft};function U(i,l,u,d){return i.os==="linux"?i[l][u][d+"-linux"]??i[l][u][d+"-unix"]??i[l][u][d]??[]:i.os==="macos"?i[l][u][d+"-macos"]??i[l][u][d+"-unix"]??i[l][u][d]??[]:i.os==="windows"?i[l][u][d+"-windows"]??i[l][u][d]??[]:[]}function J(i,l){return U(i,"ext",l,"ext-depends")}function St(i,l){return U(i,"ext",l,"ext-suggests")}function Dt(i,l){return U(i,"ext",l,"lib-depends")}function kt(i,l){return U(i,"ext",l,"lib-suggests")}function ee(i,l){return U(i,"lib",l,"lib-depends")}function Bt(i,l){return U(i,"lib",l,"lib-suggests")}function qt(i,l){const u=[],d=new Set,m=[];l.forEach(D=>{d.has(D)||Wt(i,D,d,u)});const S=[];return u.forEach(D=>{l.indexOf(D)===-1&&m.push(D),[...Dt(i,D),...kt(i,D)].forEach(o=>{S.indexOf(o)===-1&&S.push(o)})}),{exts:u,libs:Et(i,S),notIncludedExts:m}}function Et(i,l){const u=[],d=new Set;return l.forEach(m=>{d.has(m)||(console.log("before visited"),console.log(d),Ct(i,m,d,u),console.log("after visited"),console.log(d))}),u}function Ct(i,l,u,d){if(u.has(l))return;u.add(l),[...ee(i,l),...Bt(i,l)].forEach(S=>{ie(i,S,u,d)}),d.push(l)}function ie(i,l,u,d){u.has(l)||(u.add(l),ee(i,l).forEach(m=>{ie(i,m,u,d)}),d.push(l))}function se(i,l,u,d){u.has(u)||(u.add(l),J(i,l).forEach(m=>{se(i,m,u,d)}),d.push(l))}function Wt(i,l,u,d){if(u.has(l))return;u.add(l),[...J(i,l),...St(i,l)].forEach(S=>{se(i,S,u,d)}),d.push(l)}const Pt={class:"option-line"},It=["id","value","disabled"],$t=["for"],Ut={class:"option-line"},Lt=["disabled"],jt={class:"box"},Nt={class:"ext-item"},Ot=["id","value","disabled"],Vt=["for"],At={style:{color:"orangered","font-weight":"bolder"}},Tt={class:"details custom-block",open:""},_t={class:"box"},Gt={class:"ext-item"},Xt=["id","value","disabled"],Ht=["for"],Mt={class:"tip custom-block"},Rt={class:"box"},Ft={class:"ext-item"},Zt=["id","value"],Qt=["for"],Kt={key:2,class:"warning custom-block"},Yt={key:3,class:"warning custom-block"},Jt={value:"native"},el={value:"spc"},il={key:0,value:"docker"},sl=["value"],tl={for:"debug-yes"},ll={for:"debug-no"},nl={for:"zts-yes"},ol={for:"zts-no"},al={for:"show-download-yes"},dl={for:"show-download-no"},ul={for:"pre-built-yes"},pl={for:"pre-built-no"},rl={key:0},cl={for:"upx-yes"},bl={for:"upx-no"},wl=["placeholder"],gl={key:4,class:"command-container"},xl={key:0,class:"command-preview"},hl={key:1},ml={class:"warning custom-block"},yl={key:5,class:"command-container"},vl={id:"download-ext-cmd",class:"command-preview"},fl={key:6,class:"command-container"},zl={id:"download-all-cmd",class:"command-preview"},Sl={key:7,class:"command-container"},Dl={id:"download-pkg-cmd",class:"command-preview"},kl={class:"command-container"},Bl={id:"build-cmd",class:"command-preview"},ql={class:"command-container"},El={id:"craft-cmd",class:"command-preview pre"},Cl={name:"CliGenerator"},Wl=ge({...Cl,props:{lang:{type:String,default:"zh"}},setup(i){const l=w(ps),u=z(()=>{const a=[];for(const[s,t]of Object.entries(l.value))D(s,r.value)&&a.push(s);return a}),d=w(zt),m=w([]),S=[{os:"linux",label:"Linux",disabled:!1},{os:"macos",label:"macOS",disabled:!1},{os:"windows",label:"Windows",disabled:!1}],D=(a,s)=>{var b,E;const c=new Map([["linux","Linux"],["macos","Darwin"],["windows","Windows"]]).get(s),p=((E=(b=l.value[a])==null?void 0:b.support)==null?void 0:E[c])??"yes";return p==="yes"||p==="partial"},Q=["8.0","8.1","8.2","8.3","8.4"],o={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建(Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectAll:"选择全部",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini,每行写一个,例如:memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTips:"选择扩展后,不可选中的项目为必需的依赖,编译的依赖库列表中可选的为现有扩展和依赖库的可选依赖。选择可选依赖后,将生成 --with-libs 参数。",depTips2:"无法同时构建所有扩展,因为有些扩展之间相互冲突。请根据需要选择扩展。",microUnavailable:"micro 不支持 PHP 7.4 及更早版本!",windowsSAPIUnavailable:"Windows 目前不支持 fpm、embed 构建!",useUPX:"是否开启 UPX 压缩(减小二进制体积)",windowsDownSPCWarning:"Windows 下请手动下载 spc.exe 二进制文件,解压到当前目录并重命名为 spc.exe!",usePreBuilt:"如果可能,下载预编译的依赖库(减少编译时间)"},en:{selectExt:"Select Extensions",buildTarget:"Build Target",buildOptions:"Build Options",buildEnvironment:"Build Environment",buildEnvNative:"Native build (Git source code)",buildEnvSpc:"Native build (standalone spc binary)",buildEnvDocker:"Alpine docker build",useDebug:"Enable debug message",yes:"Yes",no:"No",resultShow:"Result",selectCommon:"Select common extensions",selectAll:"Select all",selectNone:"Unselect all",useZTS:"Enable ZTS",hardcodedINI:"Hardcoded INI options",hardcodedINIPlacehoder:"If you need to hardcode ini, write one per line, for example: memory_limit=2G",resultShowDownload:"Download with corresponding extension dependencies",downloadExtOnlyCommand:"Download sources by extensions command",downloadAllCommand:"Download all sources command",downloadUPXCommand:"Download UPX command",compileCommand:"Compile command",downloadPhpVersion:"Download PHP version",downloadSPCBinaryCommand:"Download spc binary command",selectedArch:"Select build architecture",selectedSystem:"Select Build OS",buildLibs:"Select Dependencies",depTips:"After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.",depTips2:"It is not possible to build all extensions at the same time, as some extensions conflict with each other. Please select the extensions you need.",microUnavailable:"Micro does not support PHP 7.4 and earlier versions!",windowsSAPIUnavailable:"Windows does not support fpm and embed build!",useUPX:"Enable UPX compression (reduce binary size)",windowsDownSPCWarning:"Please download the binary file manually, extract it to the current directory and rename to spc.exe on Windows!",usePreBuilt:"Download pre-built dependencies if possible (reduce compile time)"}},te=["cli","fpm","micro","embed","all"],le=()=>{y.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},ne=()=>{y.value=u.value},G=z(()=>y.value.join(",")),X=z(()=>{const a=B.value.filter(s=>O.value.indexOf(s)===-1);return a.length>0?' --with-libs="'+a.join(",")+'"':""}),y=w([]),B=w([]),H=w([]),O=w([]),v=w(["cli"]),V=w("spc"),I=w("8.4"),k=w(0),$=w(0),L=w(1),W=w(1),q=w(0),M=w(""),r=w("linux");_(r,()=>{r.value==="windows"&&(A.value="x86_64")});const A=w("x86_64"),T=z(()=>{switch(V.value){case"native":return"bin/spc";case"spc":return r.value==="windows"?".\\spc.exe":"./spc";case"docker":return"bin/spc-alpine-docker";default:return""}}),K=w("--build-cli"),oe=z(()=>{const a=M.value.split(` -`);let s=[];return a.forEach(t=>{t.indexOf("=")>=1&&s.push(t)})," "+s.map(t=>'-I "'+t+'"').join(" ")}),P=w(""),R=(a,s)=>a.includes(P.value)?s===0?a.substring(0,a.indexOf(P.value)):s===1?P.value:a.substring(a.indexOf(P.value)+P.value.length):s===0?a:"",ae=a=>{let s;v.value.indexOf("all")!==-1&&a.target.value==="all"?v.value=["all"]:(s=v.value.indexOf("all"))!==-1&&a.target.value!=="all"&&v.value.splice(s,1),K.value=v.value.map(t=>"--build-"+t).join(" ")},de=a=>{const s=new Set,t=c=>{let p=[];if(r.value==="linux"){if(p=l.value[c]["ext-depends-linux"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="macos"){if(p=l.value[c]["ext-depends-macos"]??l.value[c]["ext-depends-unix"]??l.value[c]["ext-depends"]??[],p.length===0)return}else if(r.value==="windows"&&(p=l.value[c]["ext-depends-windows"]??l.value[c]["ext-depends"]??[],p.length===0))return;p.forEach(b=>{s.add(b),t(b)})};return a.forEach(c=>{t(c)}),Array.from(s)},ue=z(()=>`${T.value} download --all --with-php=${I.value}${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=z(()=>`${T.value} download --with-php=${I.value} --for-extensions "${G.value}"${W.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),re=z(()=>`${T.value} install-pkg upx${k.value?" --debug":""}`),ce=z(()=>`${T.value} build ${K.value} "${G.value}"${X.value}${k.value?" --debug":""}${$.value?" --enable-zts":""}${q.value?" --with-upx-pack":""}${oe.value}`),be=z(()=>{let a=`php-version: ${I.value} -`;return a+=`extensions: "${G.value}" -`,v.value.join(",")==="all"?a+="sapi: "+["cli","fpm","micro","embed"].join(",")+` -`:a+=`sapi: ${v.value.join(",")} -`,X.value&&(a+=`libs: ${X.value.replace('--with-libs="',"").replace('"',"").trim()} -`),k.value&&(a+=`debug: true -`),a+="{{position_hold}}",q.value&&(a+=` with-upx-pack: true -`),$.value&&(a+=` enable-zts: true -`),W.value&&(a+=` prefer-pre-built: true -`),a.endsWith("{{position_hold}}")?a=a.replace("{{position_hold}}",""):a=a.replace("{{position_hold}}",`build-options: -`),a}),we=a=>{const s=new Set,t=p=>{let b=[];if(r.value==="linux"){if(b=d.value[p]["lib-depends-linux"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=d.value[p]["lib-depends-macos"]??d.value[p]["lib-depends-unix"]??d.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=d.value[p]["lib-depends-windows"]??d.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})},c=p=>{let b=[];if(r.value==="linux"){if(b=l.value[p]["lib-depends-linux"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="macos"){if(b=l.value[p]["lib-depends-macos"]??l.value[p]["lib-depends-unix"]??l.value[p]["lib-depends"]??[],b.length===0)return}else if(r.value==="windows"&&(b=l.value[p]["lib-depends-windows"]??l.value[p]["lib-depends"]??[],b.length===0))return;b.forEach(E=>{s.add(E),t(E)})};return a.forEach(p=>{c(p)}),Array.from(s)};return _(r,()=>y.value=[]),_(r,()=>q.value=0),_(y,a=>{H.value=de(a),H.value.forEach(t=>{y.value.indexOf(t)===-1&&y.value.push(t)}),y.value.sort(),console.log("检测到变化!"),console.log(a);const s=qt({ext:l.value,lib:d.value,os:r.value},y.value);m.value=s.libs.sort(),B.value=[],O.value=we(s.exts),O.value.forEach(t=>{B.value.indexOf(t)===-1&&B.value.push(t)})}),(a,s)=>(x(),g("div",null,[e("h2",null,n(o[i.lang].selectedSystem),1),e("div",Pt,[(x(),g(j,null,N(S,(t,c)=>e("span",{key:c,style:{"margin-right":"8px"}},[h(e("input",{type:"radio",id:"os-"+t.os,value:t.os,disabled:t.disabled===!0,"onUpdate:modelValue":s[0]||(s[0]=p=>r.value=p)},null,8,It),[[f,r.value]]),e("label",{for:"os-"+t.os},n(t.label),9,$t)])),64))]),e("div",Ut,[h(e("select",{"onUpdate:modelValue":s[1]||(s[1]=t=>A.value=t)},[s[20]||(s[20]=e("option",{value:"x86_64"},"x86_64",-1)),e("option",{value:"aarch64",disabled:r.value==="windows"},"aarch64",8,Lt)],512),[[F,A.value]])]),e("h2",null,n(o[i.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",jt,[h(e("input",{class:"input","onUpdate:modelValue":s[2]||(s[2]=t=>P.value=t),placeholder:"Highlight search..."},null,512),[[Y,P.value]]),s[21]||(s[21]=e("br",null,null,-1)),(x(!0),g(j,null,N(u.value,t=>(x(),g("div",Nt,[e("span",null,[h(e("input",{type:"checkbox",id:t,value:t,"onUpdate:modelValue":s[3]||(s[3]=c=>y.value=c),disabled:H.value.indexOf(t)!==-1},null,8,Ot),[[Z,y.value]]),e("label",{for:t},[e("span",null,n(R(t,0)),1),e("span",At,n(R(t,1)),1),e("span",null,n(R(t,2)),1)],8,Vt)])]))),256))]),r.value!=="windows"?(x(),g("div",{key:0,class:"my-btn",onClick:le},n(o[i.lang].selectCommon),1)):C("",!0),r.value!=="windows"?(x(),g("div",{key:1,class:"my-btn",onClick:ne},n(o[i.lang].selectAll),1)):C("",!0),e("div",{class:"my-btn",onClick:s[4]||(s[4]=t=>y.value=[])},n(o[i.lang].selectNone),1),e("details",Tt,[e("summary",null,n(o[i.lang].buildLibs)+n(B.value.length>0?" ("+B.value.length+")":""),1),e("div",_t,[(x(!0),g(j,null,N(m.value,(t,c)=>(x(),g("div",Gt,[h(e("input",{type:"checkbox",id:c,value:t,"onUpdate:modelValue":s[5]||(s[5]=p=>B.value=p),disabled:O.value.indexOf(t)!==-1},null,8,Xt),[[Z,B.value]]),e("label",{for:c},n(t),9,Ht)]))),256))])]),e("div",Mt,[s[22]||(s[22]=e("p",{class:"custom-block-title"},"TIP",-1)),e("p",null,n(o[i.lang].depTips),1),e("p",null,n(o[i.lang].depTips2),1)]),e("h2",null,n(o[i.lang].buildTarget),1),e("div",Rt,[(x(),g(j,null,N(te,t=>e("div",Ft,[h(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":s[6]||(s[6]=c=>v.value=c),onChange:ae},null,40,Zt),[[Z,v.value]]),e("label",{for:"build_"+t},n(t),9,Qt)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(x(),g("div",Kt,[s[23]||(s[23]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].microUnavailable),1)])):C("",!0),r.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(x(),g("div",Yt,[s[24]||(s[24]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].windowsSAPIUnavailable),1)])):C("",!0),e("h2",null,n(o[i.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,n(o[i.lang].buildEnvironment),1),e("td",null,[h(e("select",{"onUpdate:modelValue":s[7]||(s[7]=t=>V.value=t)},[e("option",Jt,n(o[i.lang].buildEnvNative),1),e("option",el,n(o[i.lang].buildEnvSpc),1),r.value!=="windows"?(x(),g("option",il,n(o[i.lang].buildEnvDocker),1)):C("",!0)],512),[[F,V.value]])])]),e("tr",null,[e("td",null,n(o[i.lang].downloadPhpVersion),1),e("td",null,[h(e("select",{"onUpdate:modelValue":s[8]||(s[8]=t=>I.value=t)},[(x(),g(j,null,N(Q,t=>e("option",{value:t},n(t),9,sl)),64))],512),[[F,I.value]])])]),e("tr",null,[e("td",null,n(o[i.lang].useDebug),1),e("td",null,[h(e("input",{type:"radio",id:"debug-yes",value:1,"onUpdate:modelValue":s[9]||(s[9]=t=>k.value=t)},null,512),[[f,k.value]]),e("label",tl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"debug-no",value:0,"onUpdate:modelValue":s[10]||(s[10]=t=>k.value=t)},null,512),[[f,k.value]]),e("label",ll,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].useZTS),1),e("td",null,[h(e("input",{type:"radio",id:"zts-yes",value:1,"onUpdate:modelValue":s[11]||(s[11]=t=>$.value=t)},null,512),[[f,$.value]]),e("label",nl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"zts-no",value:0,"onUpdate:modelValue":s[12]||(s[12]=t=>$.value=t)},null,512),[[f,$.value]]),e("label",ol,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].resultShowDownload),1),e("td",null,[h(e("input",{type:"radio",id:"show-download-yes",value:1,"onUpdate:modelValue":s[13]||(s[13]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",al,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"show-download-no",value:0,"onUpdate:modelValue":s[14]||(s[14]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",dl,n(o[i.lang].no),1)])]),e("tr",null,[e("td",null,n(o[i.lang].usePreBuilt),1),e("td",null,[h(e("input",{type:"radio",id:"pre-built-yes",value:1,"onUpdate:modelValue":s[15]||(s[15]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",ul,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"pre-built-no",value:0,"onUpdate:modelValue":s[16]||(s[16]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",pl,n(o[i.lang].no),1)])]),r.value!=="macos"?(x(),g("tr",rl,[e("td",null,n(o[i.lang].useUPX),1),e("td",null,[h(e("input",{type:"radio",id:"upx-yes",value:1,"onUpdate:modelValue":s[17]||(s[17]=t=>q.value=t)},null,512),[[f,q.value]]),e("label",cl,n(o[i.lang].yes),1),h(e("input",{type:"radio",id:"upx-no",value:0,"onUpdate:modelValue":s[18]||(s[18]=t=>q.value=t)},null,512),[[f,q.value]]),e("label",bl,n(o[i.lang].no),1)])])):C("",!0)]),e("h2",null,n(o[i.lang].hardcodedINI),1),h(e("textarea",{class:"textarea",placeholder:o[i.lang].hardcodedINIPlacehoder,"onUpdate:modelValue":s[19]||(s[19]=t=>M.value=t),rows:"5"},null,8,wl),[[Y,M.value]]),e("h2",null,n(o[i.lang].resultShow),1),V.value==="spc"?(x(),g("div",gl,[e("b",null,n(o[i.lang].downloadSPCBinaryCommand),1),r.value!=="windows"?(x(),g("div",xl,[xe(" curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-"+n(r.value)+"-"+n(A.value)+".tar.gz && tar -zxvf spc.tgz && rm spc.tgz",1),s[25]||(s[25]=e("br",null,null,-1))])):(x(),g("div",hl,[e("div",ml,[s[26]||(s[26]=e("p",{class:"custom-block-title"},"WARNING",-1)),e("p",null,n(o[i.lang].windowsDownSPCWarning),1),s[27]||(s[27]=e("a",{href:"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",target:"_blank"},"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",-1))])]))])):C("",!0),L.value?(x(),g("div",yl,[e("b",null,n(o[i.lang].downloadExtOnlyCommand),1),e("div",vl,n(pe.value),1)])):(x(),g("div",fl,[e("b",null,n(o[i.lang].downloadAllCommand),1),e("div",zl,n(ue.value),1)])),q.value?(x(),g("div",Sl,[e("b",null,n(o[i.lang].downloadUPXCommand),1),e("div",Dl,n(re.value),1)])):C("",!0),e("div",kl,[e("b",null,n(o[i.lang].compileCommand),1),e("div",Bl,n(ce.value),1)]),e("div",ql,[s[28]||(s[28]=e("b",null,"craft.yml",-1)),e("div",El,n(be.value),1)])]))}}),Il=he(Wl,[["__scopeId","data-v-520722c6"]]);export{Il as C}; diff --git a/assets/chunks/SearchTable.B161kDpJ.js b/assets/chunks/SearchTable.B161kDpJ.js new file mode 100644 index 00000000..e692116c --- /dev/null +++ b/assets/chunks/SearchTable.B161kDpJ.js @@ -0,0 +1 @@ +import{x as d,c as p,o as i,j as t,e as z,ag as W,aj as v,G as q,H as k,t as n}from"./framework.PeLcR_tw.js";const _={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},L={type:"external",source:"apcu"},j={type:"external",source:"ast"},F={type:"builtin"},C={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},N={type:"builtin","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["bzip2"]},O={type:"builtin"},T={type:"builtin"},V={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},E={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},I={support:{BSD:"wip"},type:"external",source:"dio"},G={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},H={type:"external",source:"ext-ds"},M={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},U={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},A={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},J={type:"builtin"},K={support:{Linux:"partial",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},P={type:"builtin"},Q={type:"builtin"},R={type:"builtin","lib-suggests":["openssl"]},X={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Y={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gettext"]},Z={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},$={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},ee={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},se={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},pe={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},ie={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},ne={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},oe={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},re={support:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},le={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},ue={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],target:["static"]},de={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ae={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},we={type:"builtin","arg-type":"custom"},ce={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},ye={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},be={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"lib-depends-unix":["libmemcached","fastlz"],"ext-depends":["session","zlib"]},xe={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"],frameworks:["CoreFoundation","Security"]},ge={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable","ext-depends":["session"]},me={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},he={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},De={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Se={support:{BSD:"wip",Windows:"wip"},type:"builtin","arg-type-unix":"custom","lib-depends-unix":["unixodbc"]},Be={type:"builtin","arg-type-unix":"custom","zend-extension":!0},fe={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","build-with-php":!0,"lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},ze={support:{BSD:"wip"},type:"external",source:"opentelemetry"},We={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},ve={support:{Windows:"no"},type:"builtin","unix-only":!0},qe={type:"builtin"},ke={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},_e={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends-unix":["unixodbc"],"ext-depends":["pdo","odbc"]},Le={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"custom","ext-depends":["pdo","pgsql"],"lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},je={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},Fe={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},Ce={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},Ne={type:"builtin","ext-depends":["zlib"]},Oe={support:{Windows:"no"},type:"builtin","unix-only":!0},Te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},Ve={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},Ee={support:{BSD:"wip",Windows:"wip"},type:"external",source:"ext-rdkafka","arg-type":"custom","cpp-extension":!0,"lib-depends":["librdkafka"]},Ie={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["readline"],target:["static"]},Ge={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},He={type:"builtin","build-with-php":!0},Me={type:"builtin","build-with-php":!0},Ue={type:"external",source:"ext-simdjson","cpp-extension":!0},Ae={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},Ke={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},Pe={type:"builtin"},Qe={support:{BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},Re={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Xe={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends":["sqlite"]},Ye={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Ze={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-path","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends":["openssl","zlib"]},$e={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},et={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},tt={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},st={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},pt={support:{BSD:"wip"},type:"builtin"},it={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["tidy"]},nt={type:"builtin","build-with-php":!0},ot={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-path","lib-depends":["libuuid"]},rt={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-path","lib-depends":["libuv"],"ext-depends":["sockets"]},lt={type:"external",source:"xdebug",target:["shared"],support:{Windows:"wip",BSD:"no",Darwin:"partial",Linux:"partial"},notes:!0,"zend-extension":!0},ut={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"],"build-with-php":!0},dt={support:{BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},at={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"],"build-with-php":!0},wt={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"],"build-with-php":!0},ct={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},yt={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},bt={type:"external",source:"ext-xz","arg-type":"with","lib-depends":["xz"]},xt={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","lib-depends-unix":["fastlz"],"ext-depends-unix":["igbinary"]},gt={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["libyaml"]},mt={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},ht={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"],target:["static"]},Dt={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},St={amqp:_,apcu:L,ast:j,bcmath:F,brotli:C,bz2:N,calendar:O,ctype:T,curl:V,dba:E,dio:I,dom:G,ds:H,enchant:M,ev:U,event:A,exif:J,ffi:K,fileinfo:P,filter:Q,ftp:R,gd:X,gettext:Y,glfw:Z,gmp:$,gmssl:ee,grpc:te,iconv:se,igbinary:pe,imagick:ie,imap:ne,inotify:oe,intl:re,ldap:le,libxml:ue,lz4:de,mbregex:ae,mbstring:we,mcrypt:ce,memcache:ye,memcached:be,mongodb:xe,msgpack:ge,mysqli:me,mysqlnd:he,oci8:De,odbc:Se,opcache:Be,openssl:fe,opentelemetry:ze,parallel:We,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-path","lib-depends":["libargon2"]},pcntl:ve,pdo:qe,pdo_mysql:ke,pdo_odbc:_e,pdo_pgsql:Le,pdo_sqlite:je,pdo_sqlsrv:Fe,pgsql:Ce,phar:Ne,posix:Oe,protobuf:Te,rar:Ve,rdkafka:Ee,readline:Ie,redis:Ge,session:He,shmop:Me,simdjson:Ue,simplexml:Ae,snappy:Je,soap:Ke,sockets:Pe,sodium:Qe,spx:Re,sqlite3:Xe,sqlsrv:Ye,ssh2:Ze,swoole:$e,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:et,sysvmsg:tt,sysvsem:st,sysvshm:pt,tidy:it,tokenizer:nt,uuid:ot,uv:rt,xdebug:lt,xhprof:ut,xlswriter:dt,xml:at,xmlreader:wt,xmlwriter:ct,xsl:yt,xz:bt,yac:xt,yaml:gt,zip:mt,zlib:ht,zstd:Dt},Bt={class:"DocSearch-SearchBar",style:{padding:"0"}},ft={class:"DocSearch-Form searchinput"},zt={key:0},Wt={key:1},vt=["href"],qt={key:0,style:{margin:"0 4px 20px 4px",color:"var(--vp-c-text-2)","font-size":"14px"}},kt={name:"SearchTable"},jt=Object.assign(kt,{setup(_t){var a,w,c,y,b,x,g,m,h,D,S,B;const o=d([]);for(const[u,e]of Object.entries(St))o.value.push({name:u,linux:((a=e.support)==null?void 0:a.Linux)===void 0?"yes":((w=e.support)==null?void 0:w.Linux)==="wip"?"":(c=e.support)==null?void 0:c.Linux,macos:((y=e.support)==null?void 0:y.Darwin)===void 0?"yes":((b=e.support)==null?void 0:b.Darwin)==="wip"?"":(x=e.support)==null?void 0:x.Darwin,freebsd:((g=e.support)==null?void 0:g.BSD)===void 0?"yes":((m=e.support)==null?void 0:m.BSD)==="wip"?"":(h=e.support)==null?void 0:h.BSD,windows:((D=e.support)==null?void 0:D.Windows)===void 0?"yes":((S=e.support)==null?void 0:S.Windows)==="wip"?"":(B=e.support)==null?void 0:B.Windows,notes:e.notes===!0});const r=d(o.value),l=d(""),f=()=>{if(l.value===""){r.value=o.value;return}r.value=o.value.filter(u=>u.name.toLowerCase().includes(l.value.toLowerCase()))};return(u,e)=>(i(),p("div",null,[t("header",Bt,[t("form",ft,[W(t("input",{class:"DocSearch-Input","onUpdate:modelValue":e[0]||(e[0]=s=>l.value=s),placeholder:"Filter name...",onInput:f},null,544),[[v,l.value]])])]),t("table",null,[e[1]||(e[1]=t("thead",null,[t("tr",null,[t("th",null,"Extension Name"),t("th",null,"Linux"),t("th",null,"macOS"),t("th",null,"FreeBSD"),t("th",null,"Windows")])],-1)),t("tbody",null,[(i(!0),p(q,null,k(r.value,s=>(i(),p("tr",null,[s.notes?(i(),p("td",Wt,[t("a",{href:"./extension-notes.html#"+s.name},n(s.name),9,vt)])):(i(),p("td",zt,n(s.name),1)),t("td",null,n(s.linux),1),t("td",null,n(s.macos),1),t("td",null,n(s.freebsd),1),t("td",null,n(s.windows),1)]))),256))])]),r.value.length===0?(i(),p("div",qt," No result, please try another keyword. ")):z("",!0)]))}});export{jt as _}; diff --git a/assets/chunks/SearchTable.DfkzfcdH.js b/assets/chunks/SearchTable.DfkzfcdH.js deleted file mode 100644 index 8df07719..00000000 --- a/assets/chunks/SearchTable.DfkzfcdH.js +++ /dev/null @@ -1 +0,0 @@ -import{x as d,c as p,o as i,j as t,e as z,ag as W,aj as v,G as q,H as k,t as n}from"./framework.PeLcR_tw.js";const _={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},L={type:"external",source:"apcu"},j={type:"external",source:"ast"},F={type:"builtin"},C={type:"external",source:"ext-brotli","arg-type":"enable","lib-depends":["brotli"]},N={type:"builtin","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["bzip2"]},O={type:"builtin"},T={type:"builtin"},V={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},E={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},I={support:{BSD:"wip"},type:"external",source:"dio"},G={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},H={type:"external",source:"ext-ds"},M={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},U={type:"external",source:"ev","arg-type-windows":"with","ext-depends":["sockets"]},A={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},J={type:"builtin"},K={support:{Linux:"partial",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},P={type:"builtin"},Q={type:"builtin"},R={type:"builtin","lib-suggests":["openssl"]},X={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Y={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gettext"]},Z={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},$={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["gmp"]},ee={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"enable-path","cpp-extension":!0,"lib-depends":["grpc"]},se={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},pe={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},ie={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},ne={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},oe={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},re={support:{BSD:"wip"},type:"builtin","lib-depends-unix":["icu"],"lib-depends-windows":["icu-static-win"]},le={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},ue={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"],target:["static"]},de={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-lz4","arg-type":"custom","lib-depends":["liblz4"]},ae={type:"builtin","arg-type":"custom",target:["static"],"ext-depends":["mbstring"],"lib-depends":["onig"]},we={type:"builtin","arg-type":"custom"},ce={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},ye={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","ext-depends":["zlib","session"],"build-with-php":!0},be={support:{Windows:"wip",BSD:"wip"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"lib-depends-unix":["libmemcached","fastlz"],"ext-depends":["session","zlib"]},xe={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"],frameworks:["CoreFoundation","Security"]},ge={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable","ext-depends":["session"]},me={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},he={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},De={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Se={support:{BSD:"wip",Windows:"wip"},type:"builtin","arg-type-unix":"custom","lib-depends-unix":["unixodbc"]},Be={type:"builtin","arg-type-unix":"custom","zend-extension":!0},fe={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},ze={support:{BSD:"wip"},type:"external",source:"opentelemetry"},We={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},ve={support:{Windows:"no"},type:"builtin","unix-only":!0},qe={type:"builtin"},ke={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},_e={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends-unix":["unixodbc"],"ext-depends":["pdo","odbc"]},Le={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"custom","ext-depends":["pdo","pgsql"],"lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},je={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},Fe={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},Ce={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends-unix":["postgresql"],"lib-depends-windows":["postgresql-win"]},Ne={type:"builtin","ext-depends":["zlib"]},Oe={support:{Windows:"no"},type:"builtin","unix-only":!0},Te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},Ve={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},Ee={support:{BSD:"wip",Windows:"wip"},type:"external",source:"ext-rdkafka","arg-type":"custom","cpp-extension":!0,"lib-depends":["librdkafka"]},Ie={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["readline"],target:["static"]},Ge={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},He={type:"builtin","build-with-php":!0},Me={type:"builtin","build-with-php":!0},Ue={type:"external",source:"ext-simdjson","cpp-extension":!0},Ae={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},Ke={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},Pe={type:"builtin"},Qe={support:{BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},Re={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Xe={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"with","lib-depends":["sqlite"]},Ye={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Ze={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-path","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends":["openssl","zlib"]},$e={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},et={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},tt={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},st={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},pt={support:{BSD:"wip"},type:"builtin"},it={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["tidy"]},nt={type:"builtin","build-with-php":!0},ot={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-path","lib-depends":["libuuid"]},rt={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-path","lib-depends":["libuv"],"ext-depends":["sockets"]},lt={type:"external",source:"xdebug",target:["shared"],support:{Windows:"wip",BSD:"no",Darwin:"partial",Linux:"partial"},notes:!0,"zend-extension":!0},ut={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"],"build-with-php":!0},dt={support:{BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},at={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"],"build-with-php":!0},wt={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"],"build-with-php":!0},ct={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"],"build-with-php":!0},yt={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-path","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},bt={type:"external",source:"ext-xz","arg-type":"with","lib-depends":["xz"]},xt={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","lib-depends-unix":["fastlz"],"ext-depends-unix":["igbinary"]},gt={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-path","arg-type-windows":"with","lib-depends":["libyaml"]},mt={support:{BSD:"wip"},type:"builtin","arg-type":"with-path","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},ht={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"],target:["static"]},Dt={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},St={amqp:_,apcu:L,ast:j,bcmath:F,brotli:C,bz2:N,calendar:O,ctype:T,curl:V,dba:E,dio:I,dom:G,ds:H,enchant:M,ev:U,event:A,exif:J,ffi:K,fileinfo:P,filter:Q,ftp:R,gd:X,gettext:Y,glfw:Z,gmp:$,gmssl:ee,grpc:te,iconv:se,igbinary:pe,imagick:ie,imap:ne,inotify:oe,intl:re,ldap:le,libxml:ue,lz4:de,mbregex:ae,mbstring:we,mcrypt:ce,memcache:ye,memcached:be,mongodb:xe,msgpack:ge,mysqli:me,mysqlnd:he,oci8:De,odbc:Se,opcache:Be,openssl:fe,opentelemetry:ze,parallel:We,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-path","lib-depends":["libargon2"]},pcntl:ve,pdo:qe,pdo_mysql:ke,pdo_odbc:_e,pdo_pgsql:Le,pdo_sqlite:je,pdo_sqlsrv:Fe,pgsql:Ce,phar:Ne,posix:Oe,protobuf:Te,rar:Ve,rdkafka:Ee,readline:Ie,redis:Ge,session:He,shmop:Me,simdjson:Ue,simplexml:Ae,snappy:Je,soap:Ke,sockets:Pe,sodium:Qe,spx:Re,sqlite3:Xe,sqlsrv:Ye,ssh2:Ze,swoole:$e,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:et,sysvmsg:tt,sysvsem:st,sysvshm:pt,tidy:it,tokenizer:nt,uuid:ot,uv:rt,xdebug:lt,xhprof:ut,xlswriter:dt,xml:at,xmlreader:wt,xmlwriter:ct,xsl:yt,xz:bt,yac:xt,yaml:gt,zip:mt,zlib:ht,zstd:Dt},Bt={class:"DocSearch-SearchBar",style:{padding:"0"}},ft={class:"DocSearch-Form searchinput"},zt={key:0},Wt={key:1},vt=["href"],qt={key:0,style:{margin:"0 4px 20px 4px",color:"var(--vp-c-text-2)","font-size":"14px"}},kt={name:"SearchTable"},jt=Object.assign(kt,{setup(_t){var a,w,c,y,b,x,g,m,h,D,S,B;const o=d([]);for(const[u,e]of Object.entries(St))o.value.push({name:u,linux:((a=e.support)==null?void 0:a.Linux)===void 0?"yes":((w=e.support)==null?void 0:w.Linux)==="wip"?"":(c=e.support)==null?void 0:c.Linux,macos:((y=e.support)==null?void 0:y.Darwin)===void 0?"yes":((b=e.support)==null?void 0:b.Darwin)==="wip"?"":(x=e.support)==null?void 0:x.Darwin,freebsd:((g=e.support)==null?void 0:g.BSD)===void 0?"yes":((m=e.support)==null?void 0:m.BSD)==="wip"?"":(h=e.support)==null?void 0:h.BSD,windows:((D=e.support)==null?void 0:D.Windows)===void 0?"yes":((S=e.support)==null?void 0:S.Windows)==="wip"?"":(B=e.support)==null?void 0:B.Windows,notes:e.notes===!0});const r=d(o.value),l=d(""),f=()=>{if(l.value===""){r.value=o.value;return}r.value=o.value.filter(u=>u.name.toLowerCase().includes(l.value.toLowerCase()))};return(u,e)=>(i(),p("div",null,[t("header",Bt,[t("form",ft,[W(t("input",{class:"DocSearch-Input","onUpdate:modelValue":e[0]||(e[0]=s=>l.value=s),placeholder:"Filter name...",onInput:f},null,544),[[v,l.value]])])]),t("table",null,[e[1]||(e[1]=t("thead",null,[t("tr",null,[t("th",null,"Extension Name"),t("th",null,"Linux"),t("th",null,"macOS"),t("th",null,"FreeBSD"),t("th",null,"Windows")])],-1)),t("tbody",null,[(i(!0),p(q,null,k(r.value,s=>(i(),p("tr",null,[s.notes?(i(),p("td",Wt,[t("a",{href:"./extension-notes.html#"+s.name},n(s.name),9,vt)])):(i(),p("td",zt,n(s.name),1)),t("td",null,n(s.linux),1),t("td",null,n(s.macos),1),t("td",null,n(s.freebsd),1),t("td",null,n(s.windows),1)]))),256))])]),r.value.length===0?(i(),p("div",qt," No result, please try another keyword. ")):z("",!0)]))}});export{jt as _}; diff --git a/assets/en_guide_cli-generator.md.akPhNfSm.js b/assets/en_guide_cli-generator.md.bbOqH_9G.js similarity index 93% rename from assets/en_guide_cli-generator.md.akPhNfSm.js rename to assets/en_guide_cli-generator.md.bbOqH_9G.js index 0671b60d..1ea55c97 100644 --- a/assets/en_guide_cli-generator.md.akPhNfSm.js +++ b/assets/en_guide_cli-generator.md.bbOqH_9G.js @@ -1 +1 @@ -import{C as t}from"./chunks/CliGenerator.DsOXoVZF.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r('

CLI Build Command Generator

TIP

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

',2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default}; +import{C as t}from"./chunks/CliGenerator.CBybgzdB.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r('

CLI Build Command Generator

TIP

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

',2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default}; diff --git a/assets/en_guide_cli-generator.md.akPhNfSm.lean.js b/assets/en_guide_cli-generator.md.bbOqH_9G.lean.js similarity index 87% rename from assets/en_guide_cli-generator.md.akPhNfSm.lean.js rename to assets/en_guide_cli-generator.md.bbOqH_9G.lean.js index 7d4cac0c..7db5e630 100644 --- a/assets/en_guide_cli-generator.md.akPhNfSm.lean.js +++ b/assets/en_guide_cli-generator.md.bbOqH_9G.lean.js @@ -1 +1 @@ -import{C as t}from"./chunks/CliGenerator.DsOXoVZF.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r("",2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default}; +import{C as t}from"./chunks/CliGenerator.CBybgzdB.js";import{d as a,c as o,o as n,af as r,J as i}from"./chunks/framework.PeLcR_tw.js";const p=JSON.parse('{"title":"CLI Build Command Generator","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"en/guide/cli-generator.md","filePath":"en/guide/cli-generator.md"}'),s={name:"en/guide/cli-generator.md"},_=a({...s,setup(l){return(c,e)=>(n(),o("div",null,[e[0]||(e[0]=r("",2)),i(t,{lang:"en"})]))}});export{p as __pageData,_ as default}; diff --git a/assets/en_guide_extension-notes.md.4_zoofny.js b/assets/en_guide_extension-notes.md.4_zoofny.js deleted file mode 100644 index 49857078..00000000 --- a/assets/en_guide_extension-notes.md.4_zoofny.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,c as i,o as a,af as l}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),s={name:"en/guide/extension-notes.md"};function t(n,e,r,d,h,c){return a(),i("div",null,e[0]||(e[0]=[l('

Extension Notes

Because it is a static compilation, extensions will not compile 100% perfectly, and different extensions have different requirements for PHP and the environment, which will be listed one by one here.

curl

HTTP3 support is not enabled by default, compile with --with-libs="nghttp2,nghttp3,ngtcp2" to enable HTTP3 support for PHP >= 8.4.

When using curl to request HTTPS, there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

phpmicro

  1. Only PHP >= 8.0 is supported.

swoole

  1. swoole >= 5.0 Only PHP >= 8.0 is supported.
  2. swoole Currently, curl hooks are not supported for PHP 8.0.x (which may be fixed in the future).
  3. When compiling, if only swoole extension is included, the supported Swoole database coroutine hook will not be fully enabled. If you need to use it, please add the corresponding swoole-hook-xxx extension.
  4. The zend_mm_heap corrupted problem may occur in swoole under some extension combinations. The cause has not yet been found.

swoole-hook-pgsql

swoole-hook-pgsql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-pgsql, you will enable Swoole's PostgreSQL client and the coroutine mode of the pdo_pgsql extension.

swoole-hook-pgsql conflicts with the pdo_pgsql extension. If you want to use Swoole and pdo_pgsql, please delete the pdo_pgsql extension and enable swoole and swoole-hook-pgsql. This extension contains an implementation of the coroutine environment for pdo_pgsql.

On macOS systems, pdo_pgsql may not be able to connect to the postgresql server normally, please use it with caution.

swoole-hook-mysql

swoole-hook-mysql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-mysql, you will enable the coroutine mode of Swoole's mysqlnd and pdo_mysql.

swoole-hook-sqlite

swoole-hook-sqlite is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-sqlite, you will enable the coroutine mode of Swoole's pdo_sqlite (Swoole must be 5.1 or above).

swoole-hook-sqlite conflicts with the pdo_sqlite extension. If you want to use Swoole and pdo_sqlite, please delete the pdo_sqlite extension and enable swoole and swoole-hook-sqlite. This extension contains an implementation of the coroutine environment for pdo_sqlite.

swow

  1. Only PHP 8.0 ~ 8.4 is supported.

imagick

  1. The imagick extension currently only has openmp support on musl libc. This means that multithreading is disabled on glibc or other operating systems. The extension is still fully functional.

imap

  1. Kerberos is not supported
  2. ext-imap is not thread safe due to the underlying c-client. It's not possible to use it in --enable-zts builds.
  3. Because the extension may be dropped from php, we recommend you look for an alternative implementation, such as Webklex/php-imap

gd

  1. gd Extension relies on more additional Graphics library. By default, using bin/spc build gd directly will not support some Graphics library, such as libjpeg, libavif, etc. Currently, it supports four libraries: freetype,libjpeg,libavif,libwebp. Therefore, the following command can be used to introduce them into the gd library:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. Currently not supported, and this extension will not be supported in the future. #32

oci8

  1. oci8 is an extension of the Oracle database, because the library on which the extension provided by Oracle does not provide a statically compiled version (.a) or source code, and this extension cannot be compiled into php by static linking, so it cannot be supported.

xdebug

  1. Xdebug is only buildable as a shared extension. You need to use a build target other than musl-static for SPC_TARGET.
  2. When using Linux/glibc or macOS, you can compile Xdebug as a shared extension using --build-shared="xdebug". The compiled ./php binary can be configured and run by specifying the INI, eg ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php.

xml

  1. xml includes xml, xmlreader, xmlwriter, xsl, dom, simplexml, etc. When adding xml extensions, it is best to enable these extensions at the same time.
  2. libxml is included in xml extension. Enabling xml is equivalent to enabling libxml.

glfw

  1. glfw depends on OpenGL, and linux environment also needs X11, which cannot be linked statically.
  2. macOS platform, we can compile and link system builtin OpenGL and related libraries dynamically.

rar

  1. The rar extension currently has a problem when compiling phpmicro with the common extension collection in the macOS x86_64 environment.

pgsql

pgsql ssl connection is not compatible with openssl 3.2.0. See:

pgsql 16.2 has fixed this bug, now it's working.

When pgsql uses SSL connection, there may be error:80000002:system library::No such file or directory error, For details on the solution, see FAQ - Unable to use ssl.

openssl

When using openssl-based extensions (such as curl, pgsql and other network libraries), there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

password-argon2

  1. password-argon2 is not a standard extension, it is an additional algorithm for the password_hash function.
  2. On Linux systems, password-argon2 dependency libargon2 conflicts with the libsodium library.

ffi

  1. Due to the limitation of musl libc's static linkage, you cannot use ffi because dynamic libraries cannot be loaded. If you need to use the ffi extension, see Compile PHP with GNU libc.
  2. macOS supports the ffi extension, but errors will occur when some kernels do not contain debugging symbols.
  3. Windows x64 supports the ffi extension.

xhprof

The xhprof extension consists of three parts: xhprof_extension, xhprof_html, xhprof_libs. Only xhprof_extension is included in the compiled binary. If you need to use xhprof, please download the source code from pecl.php.net/package/xhprof and specify the xhprof_libs and xhprof_html paths for use.

event

If you enable event extension on macOS, the openpty will be disabled due to issue:

parallel

Parallel is only supported on PHP 8.0 ZTS and above.

spx

  1. SPX does not support Windows, and the official repository does not support static compilation. static-php-cli uses a modified version.

mimalloc

  1. This is not technically an extension, but a library.
  2. Building with --with-libs="mimalloc" on Linux or macOS will override the default allocator.
  3. This is experimental for now, but is recommended in threaded environments.
',61)]))}const u=o(s,[["render",t]]);export{b as __pageData,u as default}; diff --git a/assets/en_guide_extension-notes.md.qcRlR4zd.js b/assets/en_guide_extension-notes.md.qcRlR4zd.js new file mode 100644 index 00000000..e0d4169c --- /dev/null +++ b/assets/en_guide_extension-notes.md.qcRlR4zd.js @@ -0,0 +1 @@ +import{_ as o,c as a,o as i,af as l}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),s={name:"en/guide/extension-notes.md"};function t(n,e,r,d,h,c){return i(),a("div",null,e[0]||(e[0]=[l('

Extension Notes

Because it is a static compilation, extensions will not compile 100% perfectly, and different extensions have different requirements for PHP and the environment, which will be listed one by one here.

curl

HTTP3 support is not enabled by default, compile with --with-libs="nghttp2,nghttp3,ngtcp2" to enable HTTP3 support for PHP >= 8.4.

When using curl to request HTTPS, there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

phpmicro

  1. Only PHP >= 8.0 is supported.

swoole

  1. swoole >= 5.0 Only PHP >= 8.0 is supported.
  2. swoole Currently, curl hooks are not supported for PHP 8.0.x (which may be fixed in the future).
  3. When compiling, if only swoole extension is included, the supported Swoole database coroutine hook will not be fully enabled. If you need to use it, please add the corresponding swoole-hook-xxx extension.
  4. The zend_mm_heap corrupted problem may occur in swoole under some extension combinations. The cause has not yet been found.

swoole-hook-pgsql

swoole-hook-pgsql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-pgsql, you will enable Swoole's PostgreSQL client and the coroutine mode of the pdo_pgsql extension.

swoole-hook-pgsql conflicts with the pdo_pgsql extension. If you want to use Swoole and pdo_pgsql, please delete the pdo_pgsql extension and enable swoole and swoole-hook-pgsql. This extension contains an implementation of the coroutine environment for pdo_pgsql.

On macOS systems, pdo_pgsql may not be able to connect to the postgresql server normally, please use it with caution.

swoole-hook-mysql

swoole-hook-mysql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-mysql, you will enable the coroutine mode of Swoole's mysqlnd and pdo_mysql.

swoole-hook-sqlite

swoole-hook-sqlite is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-sqlite, you will enable the coroutine mode of Swoole's pdo_sqlite (Swoole must be 5.1 or above).

swoole-hook-sqlite conflicts with the pdo_sqlite extension. If you want to use Swoole and pdo_sqlite, please delete the pdo_sqlite extension and enable swoole and swoole-hook-sqlite. This extension contains an implementation of the coroutine environment for pdo_sqlite.

swow

  1. Only PHP 8.0+ is supported.

imagick

  1. OpenMP support is disabled, this is recommended by the maintainers and also the case system packages.

imap

  1. Kerberos is not supported
  2. ext-imap is not thread safe due to the underlying c-client. It's not possible to use it in --enable-zts builds.
  3. The extension was dropped from php 8.4, we recommend you look for an alternative implementation, such as Webklex/php-imap

gd

  1. gd Extension relies on more additional Graphics library. By default, using bin/spc build gd directly will not support some Graphics library, such as libjpeg, libavif, etc. Currently, it supports four libraries: freetype,libjpeg,libavif,libwebp. Therefore, the following command can be used to introduce them into the gd library:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. Currently not supported, and this extension will not be supported in the future. #32

oci8

  1. oci8 is an extension of the Oracle database, because the library on which the extension provided by Oracle does not provide a statically compiled version (.a) or source code, and this extension cannot be compiled into php by static linking, so it cannot be supported.

xdebug

  1. Xdebug is only buildable as a shared extension. On Linux, you'll need to use a SPC_TARGET like native-native -dynamic or native-native-gnu.
  2. When using Linux/glibc or macOS, you can compile Xdebug as a shared extension using --build-shared="xdebug". The compiled ./php binary can be configured and run by specifying the INI, eg ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php.

xml

  1. xml includes xml, xmlreader, xmlwriter, xsl, dom, simplexml, etc. When adding xml extensions, it is best to enable these extensions at the same time.
  2. libxml is included in xml extension. Enabling xml is equivalent to enabling libxml.

glfw

  1. glfw depends on OpenGL, and linux environment also needs X11, which cannot be linked statically.
  2. macOS platform, we can compile and link system builtin OpenGL and related libraries dynamically.

rar

  1. The rar extension currently has a problem when compiling phpmicro with the common extension collection in the macOS x86_64 environment.

pgsql

pgsql ssl connection is not compatible with openssl 3.2.0. See:

pgsql 16.2 has fixed this bug, now it's working.

When pgsql uses SSL connection, there may be error:80000002:system library::No such file or directory error, For details on the solution, see FAQ - Unable to use ssl.

openssl

When using openssl-based extensions (such as curl, pgsql and other network libraries), there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

password-argon2

  1. password-argon2 is not a standard extension. The algorithm PASSWORD_ARGON2ID for the password_hash function needs libsodium or libargon2 to work.
  2. using password-argon2 enables multithread support for this.

ffi

  1. Due to the limitation of musl libc's static linkage, you cannot use ffi because dynamic libraries cannot be loaded. If you need to use the ffi extension, see Compile PHP with GNU libc.
  2. macOS supports the ffi extension, but errors will occur when some kernels do not contain debugging symbols.
  3. Windows x64 supports the ffi extension.

xhprof

The xhprof extension consists of three parts: xhprof_extension, xhprof_html, xhprof_libs. Only xhprof_extension is included in the compiled binary. If you need to use xhprof, please download the source code from pecl.php.net/package/xhprof and specify the xhprof_libs and xhprof_html paths for use.

event

If you enable event extension on macOS, the openpty will be disabled due to issue:

parallel

Parallel is only supported on PHP 8.0 ZTS and above.

spx

  1. SPX does not support Windows, and the official repository does not support static compilation. static-php-cli uses a modified version.

mimalloc

  1. This is not technically an extension, but a library.
  2. Building with --with-libs="mimalloc" on Linux or macOS will override the default allocator.
  3. This is experimental for now, but is recommended in threaded environments.
',61)]))}const u=o(s,[["render",t]]);export{b as __pageData,u as default}; diff --git a/assets/en_guide_extension-notes.md.4_zoofny.lean.js b/assets/en_guide_extension-notes.md.qcRlR4zd.lean.js similarity index 70% rename from assets/en_guide_extension-notes.md.4_zoofny.lean.js rename to assets/en_guide_extension-notes.md.qcRlR4zd.lean.js index 76ee2add..a7c25b2d 100644 --- a/assets/en_guide_extension-notes.md.4_zoofny.lean.js +++ b/assets/en_guide_extension-notes.md.qcRlR4zd.lean.js @@ -1 +1 @@ -import{_ as o,c as i,o as a,af as l}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),s={name:"en/guide/extension-notes.md"};function t(n,e,r,d,h,c){return a(),i("div",null,e[0]||(e[0]=[l("",61)]))}const u=o(s,[["render",t]]);export{b as __pageData,u as default}; +import{_ as o,c as a,o as i,af as l}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"Extension Notes","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extension-notes.md","filePath":"en/guide/extension-notes.md"}'),s={name:"en/guide/extension-notes.md"};function t(n,e,r,d,h,c){return i(),a("div",null,e[0]||(e[0]=[l("",61)]))}const u=o(s,[["render",t]]);export{b as __pageData,u as default}; diff --git a/assets/en_guide_extensions.md.DoDM8sGI.js b/assets/en_guide_extensions.md.DZTyKBB9.js similarity index 96% rename from assets/en_guide_extensions.md.DoDM8sGI.js rename to assets/en_guide_extensions.md.DZTyKBB9.js index a92e2467..4d7c04f3 100644 --- a/assets/en_guide_extensions.md.DoDM8sGI.js +++ b/assets/en_guide_extensions.md.DZTyKBB9.js @@ -1 +1 @@ -import{_ as o}from"./chunks/SearchTable.DfkzfcdH.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t('

Extensions

',2)),a(o),e[1]||(e[1]=t('

TIP

If an extension you need is missing, you can create a Feature Request.

Some extensions or libraries that the extension depends on will have some optional features. For example, the gd library optionally supports libwebp, freetype, etc. If you only use bin/spc build gd --build-cli they will not be included (static-php-cli defaults to the minimum dependency principle).

For more information about optional libraries, see Extensions, Library Dependency Map. For optional libraries, you can also select an extension from the Command Generator and then select optional libraries.

',1))]))}});export{d as __pageData,u as default}; +import{_ as o}from"./chunks/SearchTable.B161kDpJ.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t('

Extensions

',2)),a(o),e[1]||(e[1]=t('

TIP

If an extension you need is missing, you can create a Feature Request.

Some extensions or libraries that the extension depends on will have some optional features. For example, the gd library optionally supports libwebp, freetype, etc. If you only use bin/spc build gd --build-cli they will not be included (static-php-cli defaults to the minimum dependency principle).

For more information about optional libraries, see Extensions, Library Dependency Map. For optional libraries, you can also select an extension from the Command Generator and then select optional libraries.

',1))]))}});export{d as __pageData,u as default}; diff --git a/assets/en_guide_extensions.md.DoDM8sGI.lean.js b/assets/en_guide_extensions.md.DZTyKBB9.lean.js similarity index 86% rename from assets/en_guide_extensions.md.DoDM8sGI.lean.js rename to assets/en_guide_extensions.md.DZTyKBB9.lean.js index 38617a2a..c4953185 100644 --- a/assets/en_guide_extensions.md.DoDM8sGI.lean.js +++ b/assets/en_guide_extensions.md.DZTyKBB9.lean.js @@ -1 +1 @@ -import{_ as o}from"./chunks/SearchTable.DfkzfcdH.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t("",2)),a(o),e[1]||(e[1]=t("",1))]))}});export{d as __pageData,u as default}; +import{_ as o}from"./chunks/SearchTable.B161kDpJ.js";import{c as i,o as s,af as t,J as a}from"./chunks/framework.PeLcR_tw.js";const d=JSON.parse('{"title":"Extensions","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/extensions.md","filePath":"en/guide/extensions.md"}'),n={name:"en/guide/extensions.md"},u=Object.assign(n,{setup(l){return(r,e)=>(s(),i("div",null,[e[0]||(e[0]=t("",2)),a(o),e[1]||(e[1]=t("",1))]))}});export{d as __pageData,u as default}; diff --git a/assets/zh_guide_cli-generator.md.CDDiynmK.js b/assets/zh_guide_cli-generator.md.DneI8j6p.js similarity index 93% rename from assets/zh_guide_cli-generator.md.CDDiynmK.js rename to assets/zh_guide_cli-generator.md.DneI8j6p.js index 885b1a2d..5a7c3cdb 100644 --- a/assets/zh_guide_cli-generator.md.CDDiynmK.js +++ b/assets/zh_guide_cli-generator.md.DneI8j6p.js @@ -1 +1 @@ -import{C as a}from"./chunks/CliGenerator.DsOXoVZF.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i('

CLI 编译命令生成器

TIP

下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 支持的扩展

',2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default}; +import{C as a}from"./chunks/CliGenerator.CBybgzdB.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i('

CLI 编译命令生成器

TIP

下面选择扩展可能包含所选操作系统不支持的扩展,这可能导致编译失败。请先查阅 支持的扩展

',2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default}; diff --git a/assets/zh_guide_cli-generator.md.CDDiynmK.lean.js b/assets/zh_guide_cli-generator.md.DneI8j6p.lean.js similarity index 87% rename from assets/zh_guide_cli-generator.md.CDDiynmK.lean.js rename to assets/zh_guide_cli-generator.md.DneI8j6p.lean.js index e3c52624..5e382d47 100644 --- a/assets/zh_guide_cli-generator.md.CDDiynmK.lean.js +++ b/assets/zh_guide_cli-generator.md.DneI8j6p.lean.js @@ -1 +1 @@ -import{C as a}from"./chunks/CliGenerator.DsOXoVZF.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i("",2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default}; +import{C as a}from"./chunks/CliGenerator.CBybgzdB.js";import{d as t,c as r,o,af as i,J as l}from"./chunks/framework.PeLcR_tw.js";const m=JSON.parse('{"title":"CLI 编译命令生成器","description":"","frontmatter":{"aside":false},"headers":[],"relativePath":"zh/guide/cli-generator.md","filePath":"zh/guide/cli-generator.md"}'),s={name:"zh/guide/cli-generator.md"},p=t({...s,setup(c){return(n,e)=>(o(),r("div",null,[e[0]||(e[0]=i("",2)),l(a,{lang:"zh"})]))}});export{m as __pageData,p as default}; diff --git a/assets/zh_guide_extension-notes.md.9Fmfx-hb.js b/assets/zh_guide_extension-notes.md.9Fmfx-hb.js deleted file mode 100644 index 26051423..00000000 --- a/assets/zh_guide_extension-notes.md.9Fmfx-hb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,c as l,o as a,af as i}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"扩展注意事项","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extension-notes.md","filePath":"zh/guide/extension-notes.md"}'),r={name:"zh/guide/extension-notes.md"};function s(h,e,c,d,t,p){return a(),l("div",null,e[0]||(e[0]=[i('

扩展注意事项

因为是静态编译,扩展不会 100% 完美编译,而且不同扩展对 PHP、环境都有不同的要求,这里将一一列举。

curl

HTTP3 支持默认未启用,需在编译时添加 --with-libs="nghttp2,nghttp3,ngtcp2" 以启用 PHP 8.4 及以上版本的 HTTP3 支持。

使用 curl 请求 HTTPS 时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

phpmicro

  1. phpmicro SAPI 仅支持 PHP >= 8.0 版本。

swoole

  1. swoole >= 5.0 版本仅支持 PHP >= 8.0 版本。
  2. swoole 目前不支持 PHP 8.0 版本 curl 的 hook(后续有可能会修复)。
  3. 编译时只包含 swoole 扩展时不会完整开启支持的 Swoole 数据库协程 hook,如需使用请加入对应的 swoole-hook-xxx 扩展。
  4. swoole 在部分扩展组合下可能出现 zend_mm_heap corrupted 问题,暂未找到是什么原因导致的。

swoole-hook-pgsql

swoole-hook-pgsql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-pgsql,你将启用 Swoole 的 PostgreSQL 客户端和 pdo_pgsql 扩展的协程模式。

swoole-hook-pgsql 与 pdo_pgsql 扩展冲突。如需使用 Swoole 和 pdo_pgsql,请删除 pdo_pgsql 扩展,启用 swooleswoole-hook-pgsql 即可。 该扩展包含了 pdo_pgsql 的协程环境的实现。

在 macOS 系统,pdo_pgsql 可能无法正常连接到 postgresql 服务器,请谨慎使用。

swoole-hook-mysql

swoole-hook-mysql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-mysql,你将启用 Swoole 的 mysqlndpdo_mysql 的协程模式。

swoole-hook-sqlite

swoole-hook-sqlite 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-sqlite,你将启用 Swoole 的 pdo_sqlite 的协程模式(Swoole 必须为 5.1 以上)。

swoole-hook-sqlite 与 pdo_sqlite 扩展冲突。如需使用 Swoole 和 pdo_sqlite,请删除 pdo_sqlite 扩展,启用 swooleswoole-hook-sqlite 即可。 该扩展包含了 pdo_sqlite 的协程环境的实现。

swow

  1. swow 仅支持 PHP 8.0 ~ 8.4 版本。

imagick

imagick 扩展目前仅在 musl libc 上支持 OpenMP(libgomp)。使用 glibc 方式构建的 imagick 扩展无法支持多线程特性。

imap

  1. 该扩展目前不支持 Kerberos。
  2. 由于底层的 c-client、ext-imap 不是线程安全的。 无法在 --enable-zts 构建中使用它。
  3. 由于该扩展可能会从未来的 PHP 中删除,因此我们建议您寻找替代实现,例如 Webklex/php-imap

gd

  1. gd 扩展依赖了较多的额外图形库,默认情况下,直接使用 bin/spc build gd 不会引入和支持部分图形库,例如 libjpeglibavif 等, 需要使用 --with-libs 参数补全。目前支持 freetype,libjpeg,libavif,libwebp 四个库的支持,所以这里可以使用以下命令来让 gd 库引入它们:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. 目前未支持,未来也不计划支持此扩展。#32

oci8

  1. oci8 是 Oracle 数据库的扩展,因为 Oracle 提供的扩展所依赖的库未提供静态编译版本(.a)或源代码,无法使用静态链接的方式将此扩展编译到 php 内,故无法支持。

xdebug

  1. Xdebug 只能作为共享扩展进行构建。您需要使用除了 musl-static 外的其他 SPC_TARGET 构建目标。
  2. 使用 Linux/glibc 或 macOS 时,您可以使用 --build-shared=xdebug 将 Xdebug 编译为共享扩展。 编译后的 ./php 二进制文件可以通过指定 INI 文件进行配置和运行,例如 ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php

xml

  1. xml包括 xmlreader、xmlwriter、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。
  2. libxml 包含在 xml 扩展中。 启用 xml 相当于启用 libxml。

glfw

  1. glfw 扩展依赖 OpenGL,在 Linux 平台还依赖 X11 等环境,这些库都无法被轻易地动态链接。
  2. 在 macOS 系统下,我们可以动态链接系统的 OpenGL 和一些相关的库。

rar

  1. rar 扩展目前在 macOS x86_64 环境下与 common 扩展集合编译 phpmicro 存在问题。

pgsql

pgsql ssl 连接与 openssl 3.2.0 不兼容。相关链接:

pgsql 16.2 修复了这个 Bug,现在正常工作了。

在 pgsql 使用 SSL 连接时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

openssl

使用基于 openssl 的扩展(如 curl、pgsql 等网络库)时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

password-argon2

  1. password-argon2不是一个标准的扩展,它是 password_hash 函数的额外算法。
  2. 在Linux系统,password-argon2 的依赖库 libargon2libsodium 库冲突。

ffi

  1. 由于 musl libc 静态链接的限制,无法加载动态库,因此无法使用 ffi。 如果您需要使用 ffi 扩展,请参阅 使用 GNU libc 编译 PHP
  2. macOS 支持 ffi 扩展,但某些内核不包含调试符号时会出现错误。
  3. Windows x64 支持 ffi 扩展。

xhprof

xhprof 扩展包含三部分:xhprof_extensionxhprof_htmlxhprof_libs。编译的二进制中只包含 xhprof_extension。 如果需要使用 xhprof,请到 pecl.php.net/package/xhprof 下载源码,指定 xhprof_libsxhprof_html 路径来使用。

event

event 扩展在 macOS 系统下编译后暂无法使用 openpty 特性。相关 Issue:

parallel

parallel 扩展只支持 PHP 8.0 及以上版本,并只支持 ZTS 构建(--enable-zts)。

spx

  1. SPX 目前不支持 Windows,且官方仓库也不支持静态编译,static-php-cli 使用了 修改版本

mimalloc

  1. 从技术上讲,这不是扩展,而是一个库。
  2. 在 Linux 或 macOS 上使用 --with-libs="mimalloc" 进行构建将覆盖默认分配器。
  3. 目前,这还处于实验阶段,但建议在线程环境中使用。
',61)]))}const m=o(r,[["render",s]]);export{b as __pageData,m as default}; diff --git a/assets/zh_guide_extension-notes.md.BkfCboVT.js b/assets/zh_guide_extension-notes.md.BkfCboVT.js new file mode 100644 index 00000000..87bae16a --- /dev/null +++ b/assets/zh_guide_extension-notes.md.BkfCboVT.js @@ -0,0 +1 @@ +import{_ as o,c as l,o as a,af as i}from"./chunks/framework.PeLcR_tw.js";const b=JSON.parse('{"title":"扩展注意事项","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extension-notes.md","filePath":"zh/guide/extension-notes.md"}'),r={name:"zh/guide/extension-notes.md"};function s(h,e,c,d,t,p){return a(),l("div",null,e[0]||(e[0]=[i('

扩展注意事项

因为是静态编译,扩展不会 100% 完美编译,而且不同扩展对 PHP、环境都有不同的要求,这里将一一列举。

curl

HTTP3 支持默认未启用,需在编译时添加 --with-libs="nghttp2,nghttp3,ngtcp2" 以启用 PHP 8.4 及以上版本的 HTTP3 支持。

使用 curl 请求 HTTPS 时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

phpmicro

  1. phpmicro SAPI 仅支持 PHP >= 8.0 版本。

swoole

  1. swoole >= 5.0 版本仅支持 PHP >= 8.0 版本。
  2. swoole 目前不支持 PHP 8.0 版本 curl 的 hook(后续有可能会修复)。
  3. 编译时只包含 swoole 扩展时不会完整开启支持的 Swoole 数据库协程 hook,如需使用请加入对应的 swoole-hook-xxx 扩展。
  4. swoole 在部分扩展组合下可能出现 zend_mm_heap corrupted 问题,暂未找到是什么原因导致的。

swoole-hook-pgsql

swoole-hook-pgsql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-pgsql,你将启用 Swoole 的 PostgreSQL 客户端和 pdo_pgsql 扩展的协程模式。

swoole-hook-pgsql 与 pdo_pgsql 扩展冲突。如需使用 Swoole 和 pdo_pgsql,请删除 pdo_pgsql 扩展,启用 swooleswoole-hook-pgsql 即可。 该扩展包含了 pdo_pgsql 的协程环境的实现。

在 macOS 系统,pdo_pgsql 可能无法正常连接到 postgresql 服务器,请谨慎使用。

swoole-hook-mysql

swoole-hook-mysql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-mysql,你将启用 Swoole 的 mysqlndpdo_mysql 的协程模式。

swoole-hook-sqlite

swoole-hook-sqlite 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-sqlite,你将启用 Swoole 的 pdo_sqlite 的协程模式(Swoole 必须为 5.1 以上)。

swoole-hook-sqlite 与 pdo_sqlite 扩展冲突。如需使用 Swoole 和 pdo_sqlite,请删除 pdo_sqlite 扩展,启用 swooleswoole-hook-sqlite 即可。 该扩展包含了 pdo_sqlite 的协程环境的实现。

swow

  1. swow 仅支持 PHP 8.0+ 版本。

imagick

  1. OpenMP 支持已被禁用,这是维护者推荐的做法,系统软件包也是如此配置。

imap

  1. 该扩展目前不支持 Kerberos。
  2. 由于底层的 c-client、ext-imap 不是线程安全的。 无法在 --enable-zts 构建中使用它。
  3. 该扩展已在 PHP 8.4 中被移除,因此我们建议您寻找替代实现,例如 Webklex/php-imap

gd

  1. gd 扩展依赖了较多的额外图形库,默认情况下,直接使用 bin/spc build gd 不会引入和支持部分图形库,例如 libjpeglibavif 等, 需要使用 --with-libs 参数补全。目前支持 freetype,libjpeg,libavif,libwebp 四个库的支持,所以这里可以使用以下命令来让 gd 库引入它们:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. 目前未支持,未来也不计划支持此扩展。#32

oci8

  1. oci8 是 Oracle 数据库的扩展,因为 Oracle 提供的扩展所依赖的库未提供静态编译版本(.a)或源代码,无法使用静态链接的方式将此扩展编译到 php 内,故无法支持。

xdebug

  1. Xdebug 只能作为共享扩展进行构建。您需要使用除了 musl-static 外的其他 SPC_TARGET 构建目标。
  2. 使用 Linux/glibc 或 macOS 时,您可以使用 --build-shared=xdebug 将 Xdebug 编译为共享扩展。 编译后的 ./php 二进制文件可以通过指定 INI 文件进行配置和运行,例如 ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php

xml

  1. xml包括 xmlreader、xmlwriter、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。
  2. libxml 包含在 xml 扩展中。 启用 xml 相当于启用 libxml。

glfw

  1. glfw 扩展依赖 OpenGL,在 Linux 平台还依赖 X11 等环境,这些库都无法被轻易地动态链接。
  2. 在 macOS 系统下,我们可以动态链接系统的 OpenGL 和一些相关的库。

rar

  1. rar 扩展目前在 macOS x86_64 环境下与 common 扩展集合编译 phpmicro 存在问题。

pgsql

pgsql ssl 连接与 openssl 3.2.0 不兼容。相关链接:

pgsql 16.2 修复了这个 Bug,现在正常工作了。

在 pgsql 使用 SSL 连接时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

openssl

使用基于 openssl 的扩展(如 curl、pgsql 等网络库)时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

password-argon2

  1. password-argon2不是一个标准的扩展。password_hash 函数的 PASSWORD_ARGON2ID 算法需要 libsodium 或 libargon2 才能工作。
  2. 使用 password-argon2 可以为此启用多线程支持。

ffi

  1. 由于 musl libc 静态链接的限制,无法加载动态库,因此无法使用 ffi。 如果您需要使用 ffi 扩展,请参阅 使用 GNU libc 编译 PHP
  2. macOS 支持 ffi 扩展,但某些内核不包含调试符号时会出现错误。
  3. Windows x64 支持 ffi 扩展。

xhprof

xhprof 扩展包含三部分:xhprof_extensionxhprof_htmlxhprof_libs。编译的二进制中只包含 xhprof_extension。 如果需要使用 xhprof,请到 pecl.php.net/package/xhprof 下载源码,指定 xhprof_libsxhprof_html 路径来使用。

event

event 扩展在 macOS 系统下编译后暂无法使用 openpty 特性。相关 Issue:

parallel

parallel 扩展只支持 PHP 8.0 及以上版本,并只支持 ZTS 构建(--enable-zts)。

spx

  1. SPX 目前不支持 Windows,且官方仓库也不支持静态编译,static-php-cli 使用了 修改版本

mimalloc

  1. 从技术上讲,这不是扩展,而是一个库。
  2. 在 Linux 或 macOS 上使用 --with-libs="mimalloc" 进行构建将覆盖默认分配器。
  3. 目前,这还处于实验阶段,但建议在线程环境中使用。
',61)]))}const m=o(r,[["render",s]]);export{b as __pageData,m as default}; diff --git a/assets/zh_guide_extension-notes.md.9Fmfx-hb.lean.js b/assets/zh_guide_extension-notes.md.BkfCboVT.lean.js similarity index 100% rename from assets/zh_guide_extension-notes.md.9Fmfx-hb.lean.js rename to assets/zh_guide_extension-notes.md.BkfCboVT.lean.js diff --git a/assets/zh_guide_extensions.md.C1BoYsnJ.js b/assets/zh_guide_extensions.md.CXcHOBWO.js similarity index 96% rename from assets/zh_guide_extensions.md.C1BoYsnJ.js rename to assets/zh_guide_extensions.md.CXcHOBWO.js index 00f4d3b1..a0005b30 100644 --- a/assets/zh_guide_extensions.md.C1BoYsnJ.js +++ b/assets/zh_guide_extensions.md.CXcHOBWO.js @@ -1 +1 @@ -import{_ as i}from"./chunks/SearchTable.DfkzfcdH.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t('

扩展列表

',2)),s(i),e[1]||(e[1]=t('

TIP

如果缺少您需要的扩展,您可以创建 功能请求

有些扩展或扩展依赖的库会有一些可选的特性,例如 gd 库可选支持 libwebp、freetype 等。 如果你只使用 bin/spc build gd --build-cli 是不会包含它们(static-php-cli 默认为最小依赖原则)。

有关编译可选库,请参考 扩展、库的依赖关系图表。对于可选的库,你也可以从 编译命令生成器 中选择扩展后展开选择可选库。

',1))]))}});export{n as __pageData,p as default}; +import{_ as i}from"./chunks/SearchTable.B161kDpJ.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t('

扩展列表

',2)),s(i),e[1]||(e[1]=t('

TIP

如果缺少您需要的扩展,您可以创建 功能请求

有些扩展或扩展依赖的库会有一些可选的特性,例如 gd 库可选支持 libwebp、freetype 等。 如果你只使用 bin/spc build gd --build-cli 是不会包含它们(static-php-cli 默认为最小依赖原则)。

有关编译可选库,请参考 扩展、库的依赖关系图表。对于可选的库,你也可以从 编译命令生成器 中选择扩展后展开选择可选库。

',1))]))}});export{n as __pageData,p as default}; diff --git a/assets/zh_guide_extensions.md.C1BoYsnJ.lean.js b/assets/zh_guide_extensions.md.CXcHOBWO.lean.js similarity index 86% rename from assets/zh_guide_extensions.md.C1BoYsnJ.lean.js rename to assets/zh_guide_extensions.md.CXcHOBWO.lean.js index 1a96ca2f..3597b467 100644 --- a/assets/zh_guide_extensions.md.C1BoYsnJ.lean.js +++ b/assets/zh_guide_extensions.md.CXcHOBWO.lean.js @@ -1 +1 @@ -import{_ as i}from"./chunks/SearchTable.DfkzfcdH.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t("",2)),s(i),e[1]||(e[1]=t("",1))]))}});export{n as __pageData,p as default}; +import{_ as i}from"./chunks/SearchTable.B161kDpJ.js";import{c as a,o as l,af as t,J as s}from"./chunks/framework.PeLcR_tw.js";const n=JSON.parse('{"title":"扩展列表","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extensions.md","filePath":"zh/guide/extensions.md"}'),o={name:"zh/guide/extensions.md"},p=Object.assign(o,{setup(c){return(r,e)=>(l(),a("div",null,[e[0]||(e[0]=t("",2)),s(i),e[1]||(e[1]=t("",1))]))}});export{n as __pageData,p as default}; diff --git a/deps-craft-yml.html b/deps-craft-yml.html index c54d2b9c..c462c8a0 100644 --- a/deps-craft-yml.html +++ b/deps-craft-yml.html @@ -86,7 +86,7 @@ extra-env: # e.g. Use github token to avoid rate limit GITHUB_TOKEN: your-github-token - + \ No newline at end of file diff --git a/deps-map-ext.html b/deps-map-ext.html index acd3fba3..b22b4c81 100644 --- a/deps-map-ext.html +++ b/deps-map-ext.html @@ -19,7 +19,7 @@
Skip to content

Linux

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvpcntlunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

macOS

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
glfwglfw
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

Windows

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqpopenssllibrabbitmq
brotlibrotli
bz2bzip2
curlzlib
openssl
curl
dbaqdbm
domxmllibxml2
zlib
evsockets
ffilibffi-win
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gmsslgmssl
iconvlibiconv-win
igbinarysession
apcu
intlicu-static-win
libxmlxml
mbregexmbstringonig
msgpacksession
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
parallelpthreads4w
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
pdo_pgsqlpdo
pgsql
postgresql-win
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql-win
pharzlib
redissession
igbinary
simplexmlxmllibxml2
soapxmllibxml2
sodiumlibsodium
sqlite3sqlite
ssh2openssl
zlib
libssh2
swowopenssl
curl
openssl
curl
xlswriterzlib
zip
openssl
xmliconvlibxml2
xmlreaderxml
dom
libxml2
xmlwriterxmllibxml2
xzxz
yamllibyaml
zipzlib
bz2
libzip
zlib
bzip2
xz
zlibzlib

FreeBSD

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
evsockets
ftpopenssl
mbregexmbstringonig
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
pdo_mysqlpdo
mysqlnd
pharzlib
xzxz
zlibzlib

Released under the MIT License.

- + \ No newline at end of file diff --git a/deps-map-lib.html b/deps-map-lib.html index 748cca89..226fd2ff 100644 --- a/deps-map-lib.html +++ b/deps-map-lib.html @@ -19,7 +19,7 @@
Skip to content

Linux

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libaclattr
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

macOS

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

Windows

Library NameRequired LibrariesSuggested Libraries
curlzlib
libssh2
nghttp2
brotli
zstd
freetypezliblibpng
bzip2
brotli
libjpegzlib
libpngzlib
librabbitmqopenssl
libssh2openssl
libxml2libiconv-winzlib
libzipzlib
bzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib

FreeBSD

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
opensslzlib

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/contributing/index.html b/en/contributing/index.html index 34d3aa12..56684ff7 100644 --- a/en/contributing/index.html +++ b/en/contributing/index.html @@ -19,7 +19,7 @@
Skip to content

Contributing

Thank you for being here, this project welcomes your contributions!

Contribution Guide

If you have code or documentation to contribute, here's what you need to know first.

  1. What type of code are you contributing? (new extensions, bug fixes, security issues, project framework optimizations, documentation)
  2. If you contribute new files or new snippets, is your code checked by php-cs-fixer and phpstan?
  3. Have you fully read the Developer Guide before contributing code?

If you can answer the above questions and have made changes to the code, you can initiate a Pull Request in the project GitHub repository in time. After the code review is completed, the code can be modified according to the suggestion, or directly merged into the main branch.

Contribution Type

The main purpose of this project is to compile statically linked PHP binaries, and the command line processing function is written based on symfony/console. Before development, if you are not familiar with it, Check out the symfony/console documentation first.

Security Update

Because this project is basically a PHP project running locally, generally speaking, there will be no remote attacks. But if you find such a problem, please **DO NOT submit a PR or Issue in the GitHub repository, You need to contact the project maintainer (crazywhalecc) via mail.

Fix Bugs

Fixing bugs generally does not involve modification of the project structure and framework, so if you can locate the wrong code and fix it directly, please submit a PR directly.

New Extensions

For adding a new extension, you need to understand some basic structure of the project and how to add a new extension according to the existing logic. It will be covered in detail in the next section on this page. In general, you will need:

  1. Evaluate whether the extension can be compiled inline into PHP.
  2. Evaluate whether the extension's dependent libraries (if any) can be compiled statically.
  3. Write library compile commands on different platforms.
  4. Verify that the extension and its dependencies are compatible with existing extensions and dependencies.
  5. Verify that the extension works normally in cli, micro, fpm, embed SAPIs.
  6. Write documentation and add your extension.

Project Framework Optimization

If you are already familiar with the working principle of symfony/console, and at the same time want to make some modifications or optimizations to the framework of the project, please understand the following things first:

  1. Adding extensions does not belong to project framework optimization, but if you find that you have to optimize the framework when adding new extensions, you need to modify the framework itself before adding extensions.
  2. For some large-scale logical modifications (such as those involving LibraryBase, Extension objects, etc.), it is recommended to submit an Issue or Draft PR for discussion first.
  3. In the early stage of the project, it was a pure private development project, and there were some Chinese comments in the code. After internationalizing your project you can submit a PR to translate these comments into English.
  4. Please do not submit more useless code fragments in the code, such as a large number of unused variables, methods, classes, and code that has been rewritten many times.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/develop/craft-yml.html b/en/develop/craft-yml.html index bbd5431f..015fc249 100644 --- a/en/develop/craft-yml.html +++ b/en/develop/craft-yml.html @@ -86,7 +86,7 @@ extra-env: # e.g. Use github token to avoid rate limit GITHUB_TOKEN: your-github-token - + \ No newline at end of file diff --git a/en/develop/doctor-module.html b/en/develop/doctor-module.html index da812394..bb58e7e7 100644 --- a/en/develop/doctor-module.html +++ b/en/develop/doctor-module.html @@ -47,7 +47,7 @@ } return true; }

#[AsFixItem()] first parameter is the name of the fix item, and this method must return True or False. When False is returned, the automatic repair failed and manual handling is required.

In the code here, shell()->exec() is the method of executing commands of the project, which is used to replace exec() and system(), and also provides debugging, obtaining execution status, entering directories, etc. characteristic.

- + \ No newline at end of file diff --git a/en/develop/index.html b/en/develop/index.html index d6de0a0a..cc2b22b3 100644 --- a/en/develop/index.html +++ b/en/develop/index.html @@ -19,7 +19,7 @@
Skip to content

Start Developing

Developing this project requires the installation and deployment of a PHP environment, as well as some extensions and Composer commonly used in PHP projects.

The development environment and running environment of the project are almost exactly the same. You can refer to the Manual Build section to install system PHP or use the pre-built static PHP of this project as the environment. I will not go into details here.

Regardless of its purpose, this project itself is actually a php-cli program. You can edit and develop it as a normal PHP project. At the same time, you need to understand the Shell languages of different systems.

The current purpose of this project is to compile statically compiled independent PHP, but the main part also includes compiling static versions of many dependent libraries, so you can reuse this set of compilation logic to build independent binary versions of other programs, such as Nginx, etc.

Environment preparation

A PHP environment is required to develop this project. You can use the PHP that comes with the system, or you can use the static PHP built by this project.

Regardless of which PHP you use, in your development environment you need to install these extensions:

curl,dom,filter,mbstring,openssl,pcntl,phar,posix,sodium,tokenizer,xml,xmlwriter

The static-php-cli project itself does not require so many extensions, but during the development process, you will use tools such as Composer and PHPUnit, which require these extensions.

For micro self-executing binaries built by static-php-cli itself, only pcntl,posix,mbstring,tokenizer,phar is required.

Start development

Continuing down to see the project structure documentation, you can learn how static-php-cli works.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/develop/php-src-changes.html b/en/develop/php-src-changes.html index fda73619..a3d0f3d6 100644 --- a/en/develop/php-src-changes.html +++ b/en/develop/php-src-changes.html @@ -19,7 +19,7 @@
Skip to content

Modifications to PHP source code

During the static compilation process, static-php-cli made some modifications to the PHP source code in order to achieve good compatibility, performance, and security. The following is a description of the current modifications to the PHP source code.

Based on the patches provided by the phpmicro project, static-php-cli has made some modifications to the PHP source code to meet the needs of static compilation. The patches currently used by static-php-cli during compilation in the patch list are:

  • static_opcache
  • static_extensions_win32
  • cli_checks
  • disable_huge_page
  • vcruntime140
  • win32
  • zend_stream
  • cli_static
  • macos_iconv
  • phar

PHP <= 8.1 libxml patch

Because PHP only provides security updates for 8.1 and stops updating older versions, static-php-cli applies the libxml compilation patch that has been applied in newer versions of PHP to PHP 8.1 and below.

gd extension Windows patch

Compiling the gd extension under Windows requires major changes to the config.w32 file. static-php-cli has made some changes to the gd extension to make it easier to compile under Windows.

YAML extension Windows patch

YAML extension needs to modify the config.w32 file to compile under Windows. static-php-cli has made some modifications to the YAML extension to make it easier to compile under Windows.

static-php-cli version information insertion

When compiling, static-php-cli will insert the static-php-cli version information into the PHP version information for easy identification.

Add option to hardcode INI

When using the -I parameter to hardcode INI into static PHP functionality, static-php-cli will modify the PHP source code to insert the hardcoded content.

Linux system repair patch

Some compilation environments may lack some system header files or libraries. static-php-cli will automatically fix these problems during compilation, such as:

  • HAVE_STRLCAT missing problem
  • HAVE_STRLCPY missing problem

Fiber issue fix patch for Windows

When compiling PHP on Windows, there will be some issues with the Fiber extension. static-php-cli will automatically fix these issues during compilation (modify config.w32 in php-src).

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/develop/source-module.html b/en/develop/source-module.html index 5a060947..8ef27ae6 100644 --- a/en/develop/source-module.html +++ b/en/develop/source-module.html @@ -138,7 +138,7 @@ } } } - + \ No newline at end of file diff --git a/en/develop/structure.html b/en/develop/structure.html index 1433310a..382081b3 100644 --- a/en/develop/structure.html +++ b/en/develop/structure.html @@ -28,7 +28,7 @@ box.json # Configuration file for packaging Phar another-app.php # Entry file of another project vendor/crazywhalecc/static-php-cli/* # Your project is used as a dependent library

When packaging these files under the directory /home/example/another-app/ into app.phar, the value of the following constant for your project should be:

ConstantValue
WORKING_DIR/home/example/another-app
SOURCE_ROOT_DIRphar:///home/example/another-app/app.phar/
FRAMEWORK_ROOT_DIRphar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli
__DIR__phar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli/src/App
__FILE__phar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli/src/App/MyCommand.php
- + \ No newline at end of file diff --git a/en/develop/system-build-tools.html b/en/develop/system-build-tools.html index 69ff767b..08308c44 100644 --- a/en/develop/system-build-tools.html +++ b/en/develop/system-build-tools.html @@ -86,7 +86,7 @@ make TARGET=x86_64-linux-musl -j make TARGET=x86_64-linux-musl install -j tar cvzf x86_64-musl-toolchain.tgz output/*

TIP

All the above scripts are suitable for x86_64 architecture Linux. If you need to build musl-cross-make for the ARM environment, just replace all x86_64 above with aarch64.

This compilation process may fail due to insufficient memory, network problems, etc. You can try a few more times, or use a machine with larger memory to compile. If you encounter problems or you have better improvement solutions, go to Discussion.

macOS Environment

For macOS systems, the main compilation tool we use is clang, which is the default compiler for macOS systems and is also the compiler of Xcode.

Compiling under macOS mainly relies on Xcode or Xcode Command Line Tools. You can download Xcode from the App Store, or execute xcode-select --install in the terminal to install Xcode Command Line Tools.

In addition, in the doctor environment check module, static-php-cli will check whether Homebrew, compilation tools, etc. are installed on the macOS system. If not, you will be prompted to install them. I will not go into details here.

FreeBSD Environment

FreeBSD is also a Unix system, and its compilation tools are similar to macOS. You can directly use the package management pkg to install clang and other compilation tools through the doctor command.

pkg-config Compilation (*nix only)

If you observe the compilation log when using static-php-cli to build static PHP, you will find that no matter what is compiled, pkg-config will be compiled first. This is because pkg-config is a library used to find dependencies. In earlier versions of static-php-cli, we directly used the pkg-config tool installed by package management, but this would cause some problems, such as:

In order to avoid the above problems, we compile pkg-config into buildroot/bin in user mode and use it. We use parameters such as --without-sysroot to avoid looking for dependent packages from the system path.

- + \ No newline at end of file diff --git a/en/faq/index.html b/en/faq/index.html index 538b854a..d4c3ac5d 100644 --- a/en/faq/index.html +++ b/en/faq/index.html @@ -22,7 +22,7 @@ bin/spc-gnu-docker build ffi,xml --build-cli --debug buildroot/bin/php -d "zend_extension=/path/to/php{PHP_VER}-{ts/nts}/xdebug.so" --ri xdebug

For macOS platform, almost all binaries under macOS cannot be truly purely statically linked, and almost all binaries will link macOS system libraries: /usr/lib/libresolv.9.dylib and /usr/lib/libSystem.B.dylib. So on macOS, you can directly use SPC to build statically compiled PHP binaries with dynamically linked extensions:

  1. Build shared extension xxx.so using: --build-shared=XXX option. e.g. bin/spc build bcmath,zlib --build-shared=xdebug --build-cli
  2. You will get buildroot/modules/xdebug.so and buildroot/bin/php.
  3. The xdebug.so file could be used for php that version and thread-safe are the same.

Can it support Oracle database extension?

Some extensions that rely on closed source libraries, such as oci8, sourceguardian, etc., they do not provide purely statically compiled dependent library files (.a), only dynamic dependent library files (.so). These extensions cannot be compiled into static-php-cli using source code, so this project may never support these extensions. However, in theory you can access and use such extensions under macOS and Linux according to the above questions.

If you have a need for such extensions, or most people have needs for these closed-source extensions, see the discussion on standalone-php-cli. Welcome to leave a message.

Does it support Windows?

The project currently supports Windows, but the number of supported extensions is small. Windows support is not perfect. There are mainly the following problems:

  1. 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.
  2. 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.

Can I protect my source code with micro?

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.

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.

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.

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.

Unable to use ssl

Update: This issue has been fixed in the latest version of static-php-cli, which now reads the system's certificate file by default. If you still have problems, try the solution below.

When using curl, pgsql, etc. to request an HTTPS website or establish an SSL connection, there may be an error:80000002:system library::No such file or directory error. This error is caused by statically compiled PHP without specifying openssl.cafile via php.ini.

You can solve this problem by specifying php.ini before using PHP and adding openssl.cafile=/path/to/your-cert.pem in the INI.

For Linux systems, you can download the cacert.pem file from the curl official website, or you can use the certificate file that comes with the system. For the certificate locations of different distros, please refer to Golang docs.

INI configuration openssl.cafile cannot be set dynamically using the ini_set() function, because openssl.cafile is a PHP_INI_SYSTEM type configuration and can only be set in the php.ini file.

Why don't we support older versions of PHP?

Because older versions of PHP have many problems, such as security issues, performance issues, and functional issues. In addition, many older versions of PHP are not compatible with the latest dependency libraries, which is one of the reasons why older versions of PHP are not supported.

You can use older versions compiled earlier by static-php-cli, such as PHP 8.0, but earlier versions will not be explicitly supported.

- + \ No newline at end of file diff --git a/en/guide/action-build.html b/en/guide/action-build.html index e46e5718..3219c746 100644 --- a/en/guide/action-build.html +++ b/en/guide/action-build.html @@ -19,7 +19,7 @@
Skip to content

GitHub Action Build

Action Build refers to compiling directly using GitHub Action.

If you don't want to compile it yourself, you can download the artifact from the existing Action in this project, or you can download it from a self-hosted server:Enter.

Self-hosted binaries are also built from Actions: repo. The extensions included are: bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl, pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip

Build Guide

Using GitHub Action makes it easy to build a statically compiled PHP and phpmicro, while also defining the extensions to compile.

  1. Fork project.
  2. Go to the Actions of the project and select CI.
  3. Select Run workflow, fill in the PHP version you want to compile, the target type, and the list of extensions. (extensions comma separated, e.g. bcmath,curl,mbstring)
  4. After waiting for about a period of time, enter the corresponding task and get Artifacts.

If you enable debug, all logs will be output at build time, including compiled logs, for troubleshooting.

If you need to build in other environments, you can use manual build.

Extensions

You can go to extensions check here to see if all the extensions you need currently support. and then go to command generator select the extension you need to compile, copy the extensions string to extensions option.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/guide/build-on-windows.html b/en/guide/build-on-windows.html index cd13c3dc..ca4187e4 100644 --- a/en/guide/build-on-windows.html +++ b/en/guide/build-on-windows.html @@ -41,7 +41,7 @@ bin/spc micro:combine code.php -O my-app.exe # Run it!!! Copy it to another computer!!! ./my-app.exe

If you package a PHAR file, just replace code.php with the phar file path. You can use box-project/box to package your CLI project as Phar, It is then combined with phpmicro to produce a standalone executable binary.

For more details on the micro:combine command, refer to command on Unix systems.

- + \ No newline at end of file diff --git a/en/guide/build-with-glibc.html b/en/guide/build-with-glibc.html index 8e6cfcbb..282eb78d 100644 --- a/en/guide/build-with-glibc.html +++ b/en/guide/build-with-glibc.html @@ -19,7 +19,7 @@
Skip to content

Build glibc Compatible Linux Binary

Why Build glibc Compatible Binary

Currently, the binaries built by static-php-cli on Linux by default are based on musl-libc (statically linked). musl-libc is a lightweight libc implementation that aims to be compatible with glibc and provides good support for pure static linking. This means that the compiled static PHP executable can be used on almost any Linux distribution without worrying about the versions of libc, libstdc++, etc.

However, there are some issues with pure static linking of musl-libc binaries on Linux:

  • The dl() function in PHP cannot be used to load dynamic libraries and external PHP extensions.
  • The FFI extension in PHP cannot be used.
  • In some extreme cases, performance issues may occur. See musl-libc performance issues.

Different Linux distributions use different default libc. For example, Alpine Linux uses musl libc, while most Linux distributions use glibc. However, even so, we cannot directly use any distribution using glibc to build portable static binaries because glibc has some issues:

  • Binaries built with gcc and other tools on newer versions of distributions cannot run on older versions of distributions.
  • glibc is not recommended to be statically linked because some of its features require the support of dynamic libraries.

However, we can use Docker to solve this problem. The final output is a binary dynamically linked with glibc and some necessary libraries, but statically linked with all other dependencies.

  1. Use an older version of a Linux distribution (such as CentOS 7.x), which has an older version of glibc but can run on most modern Linux distributions.
  2. Build the static binary of PHP in this container so that it can run on most modern Linux distributions.

Using glibc static binaries can run on most modern Linux distributions but cannot run on musl libc distributions, such as CentOS 6, Alpine Linux, etc.

Build glibc Compatible Linux Binary

The latest version of static-php-cli includes the bin/spc-gnu-docker script, which can create a CentOS 7.x (glibc-2.17) Docker container with one click and build a glibc compatible PHP static binary in the container.

Then, run the following command once. The first run will take a long time because it needs to download the CentOS 7.x image and some build tools.

bash
bin/spc-gnu-docker

After the image is built, you will see the same command help menu as bin/spc, which means the container is ready.

After the container is ready, you can refer to the local build section to build your PHP static binary. Just replace bin/spc or ./spc with bin/spc-gnu-docker.

bash
bin/spc-gnu-docker build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug

Notes

In rare cases, glibc-based static PHP may encounter segment faults and other errors, but there are currently few examples. If you encounter any issues, please submit an issue.

glibc build is an extended feature and is not part of the default static-php support. If you have related issues or requirements, please indicate that you are building based on glibc when submitting an issue.

If you need to build glibc-based binaries without using Docker, please refer to the bin/spc-gnu-docker script to manually create a similar environment.

Please keep in mind that we only support glibc build with bin/spc-gnu-docker. Compilation on RHEL 9 & 10 has been tested and is stable, but if you run into issues, we may choose not to fix them.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/guide/cli-generator.html b/en/guide/cli-generator.html index 5e8f9796..ed3f5780 100644 --- a/en/guide/cli-generator.html +++ b/en/guide/cli-generator.html @@ -13,8 +13,8 @@ - - + + @@ -25,7 +25,7 @@ sapi: cli build-options: prefer-pre-built: true - + \ No newline at end of file diff --git a/en/guide/deps-map.html b/en/guide/deps-map.html index ee25fd3d..02b2b65c 100644 --- a/en/guide/deps-map.html +++ b/en/guide/deps-map.html @@ -19,7 +19,7 @@
Skip to content

Dependency Table

When compiling PHP, each extension and library has dependencies, which may be required or optional. You can choose whether to include these optional dependencies.

For example, when compiling the gd extension under Linux, the zlib,libpng libraries and the zlib extension are forced to be compiled, while the libavif,libwebp,libjpeg,freetype libraries are optional libraries and will not be compiled by default unless specified by the --with-libs=avif,webp,jpeg,freetype option.

  • For optional extensions (optional features of extensions), you need to specify them manually at compile time, for example, to enable igbinary support for Redis: bin/spc build redis,igbinary.
  • For optional libraries, you need to compile and specify them through the --with-libs=XXX option.
  • If you want to enable all optional extensions, you can use bin/spc build redis --with-suggested-exts.
  • If you want to enable all optional libraries, you can use --with-suggested-libs.

Extension Dependency Table

Linux

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvpcntlunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

macOS

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
glfwglfw
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

Windows

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqpopenssllibrabbitmq
brotlibrotli
bz2bzip2
curlzlib
openssl
curl
dbaqdbm
domxmllibxml2
zlib
evsockets
ffilibffi-win
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gmsslgmssl
iconvlibiconv-win
igbinarysession
apcu
intlicu-static-win
libxmlxml
mbregexmbstringonig
msgpacksession
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
parallelpthreads4w
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
pdo_pgsqlpdo
pgsql
postgresql-win
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql-win
pharzlib
redissession
igbinary
simplexmlxmllibxml2
soapxmllibxml2
sodiumlibsodium
sqlite3sqlite
ssh2openssl
zlib
libssh2
swowopenssl
curl
openssl
curl
xlswriterzlib
zip
openssl
xmliconvlibxml2
xmlreaderxml
dom
libxml2
xmlwriterxmllibxml2
xzxz
yamllibyaml
zipzlib
bz2
libzip
zlib
bzip2
xz
zlibzlib

FreeBSD

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
evsockets
ftpopenssl
mbregexmbstringonig
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
pdo_mysqlpdo
mysqlnd
pharzlib
xzxz
zlibzlib

Library Dependency Table

Linux

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libaclattr
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

macOS

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

Windows

Library NameRequired LibrariesSuggested Libraries
curlzlib
libssh2
nghttp2
brotli
zstd
freetypezliblibpng
bzip2
brotli
libjpegzlib
libpngzlib
librabbitmqopenssl
libssh2openssl
libxml2libiconv-winzlib
libzipzlib
bzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib

FreeBSD

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
opensslzlib

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/guide/env-vars.html b/en/guide/env-vars.html index 46782690..4f6ae736 100644 --- a/en/guide/env-vars.html +++ b/en/guide/env-vars.html @@ -30,7 +30,7 @@ [linux] SPC_DEFAULT_C_FLAGS="-O3"

Library environment variables (Unix only)

Starting from 2.2.0, static-php-cli supports custom environment variables for all compilation dependent library commands of macOS, Linux, FreeBSD and other Unix systems.

In this way, you can adjust the behavior of compiling dependent libraries through environment variables at any time. For example, you can set the optimization parameters for compiling the xxx library through xxx_CFLAGS=-O0.

Of course, not every library supports the injection of environment variables. We currently provide three wildcard environment variables with the suffixes:

The prefix is the name of the dependent library, and the specific name of the library is subject to lib.json. Among them, the library name with - needs to replace - with _.

Here is an example of an optimization option that replaces the openssl library compilation:

shell
openssl_CFLAGS="-O0"

The library name uses the same name listed in lib.json and is case-sensitive.

TIP

When no relevant environment variables are specified, except for the following variables, the remaining values are empty by default:

var namevar default value
pkg_config_CFLAGSmacOS: $SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion, Other: empty
pkg_config_LDFLAGSLinux: --static, Other: empty
imagemagick_LDFLAGSLinux: -static, Other: empty
imagemagick_LIBSmacOS: -liconv, Other: empty
ldap_LDFLAGS-L$BUILD_LIB_PATH
openssl_CFLAGSLinux: $SPC_DEFAULT_C_FLAGS, Other: empty
others...empty

The following table is a list of library names that support customizing the above three variables:

lib name
brotli
bzip
curl
freetype
gettext
gmp
imagemagick
ldap
libargon2
libavif
libcares
libevent
openssl

TIP

Because adapting custom environment variables to each library is a particularly tedious task, and in most cases you do not need custom environment variables for these libraries, so we currently only support custom environment variables for some libraries.

If the library you need to customize environment variables is not listed above, you can submit your request through GitHub Issue.

- + \ No newline at end of file diff --git a/en/guide/extension-notes.html b/en/guide/extension-notes.html index e9ee8f75..011200ef 100644 --- a/en/guide/extension-notes.html +++ b/en/guide/extension-notes.html @@ -13,13 +13,13 @@ - + -
Skip to content

Extension Notes

Because it is a static compilation, extensions will not compile 100% perfectly, and different extensions have different requirements for PHP and the environment, which will be listed one by one here.

curl

HTTP3 support is not enabled by default, compile with --with-libs="nghttp2,nghttp3,ngtcp2" to enable HTTP3 support for PHP >= 8.4.

When using curl to request HTTPS, there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

phpmicro

  1. Only PHP >= 8.0 is supported.

swoole

  1. swoole >= 5.0 Only PHP >= 8.0 is supported.
  2. swoole Currently, curl hooks are not supported for PHP 8.0.x (which may be fixed in the future).
  3. When compiling, if only swoole extension is included, the supported Swoole database coroutine hook will not be fully enabled. If you need to use it, please add the corresponding swoole-hook-xxx extension.
  4. The zend_mm_heap corrupted problem may occur in swoole under some extension combinations. The cause has not yet been found.

swoole-hook-pgsql

swoole-hook-pgsql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-pgsql, you will enable Swoole's PostgreSQL client and the coroutine mode of the pdo_pgsql extension.

swoole-hook-pgsql conflicts with the pdo_pgsql extension. If you want to use Swoole and pdo_pgsql, please delete the pdo_pgsql extension and enable swoole and swoole-hook-pgsql. This extension contains an implementation of the coroutine environment for pdo_pgsql.

On macOS systems, pdo_pgsql may not be able to connect to the postgresql server normally, please use it with caution.

swoole-hook-mysql

swoole-hook-mysql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-mysql, you will enable the coroutine mode of Swoole's mysqlnd and pdo_mysql.

swoole-hook-sqlite

swoole-hook-sqlite is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-sqlite, you will enable the coroutine mode of Swoole's pdo_sqlite (Swoole must be 5.1 or above).

swoole-hook-sqlite conflicts with the pdo_sqlite extension. If you want to use Swoole and pdo_sqlite, please delete the pdo_sqlite extension and enable swoole and swoole-hook-sqlite. This extension contains an implementation of the coroutine environment for pdo_sqlite.

swow

  1. Only PHP 8.0 ~ 8.4 is supported.

imagick

  1. The imagick extension currently only has openmp support on musl libc. This means that multithreading is disabled on glibc or other operating systems. The extension is still fully functional.

imap

  1. Kerberos is not supported
  2. ext-imap is not thread safe due to the underlying c-client. It's not possible to use it in --enable-zts builds.
  3. Because the extension may be dropped from php, we recommend you look for an alternative implementation, such as Webklex/php-imap

gd

  1. gd Extension relies on more additional Graphics library. By default, using bin/spc build gd directly will not support some Graphics library, such as libjpeg, libavif, etc. Currently, it supports four libraries: freetype,libjpeg,libavif,libwebp. Therefore, the following command can be used to introduce them into the gd library:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. Currently not supported, and this extension will not be supported in the future. #32

oci8

  1. oci8 is an extension of the Oracle database, because the library on which the extension provided by Oracle does not provide a statically compiled version (.a) or source code, and this extension cannot be compiled into php by static linking, so it cannot be supported.

xdebug

  1. Xdebug is only buildable as a shared extension. You need to use a build target other than musl-static for SPC_TARGET.
  2. When using Linux/glibc or macOS, you can compile Xdebug as a shared extension using --build-shared="xdebug". The compiled ./php binary can be configured and run by specifying the INI, eg ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php.

xml

  1. xml includes xml, xmlreader, xmlwriter, xsl, dom, simplexml, etc. When adding xml extensions, it is best to enable these extensions at the same time.
  2. libxml is included in xml extension. Enabling xml is equivalent to enabling libxml.

glfw

  1. glfw depends on OpenGL, and linux environment also needs X11, which cannot be linked statically.
  2. macOS platform, we can compile and link system builtin OpenGL and related libraries dynamically.

rar

  1. The rar extension currently has a problem when compiling phpmicro with the common extension collection in the macOS x86_64 environment.

pgsql

pgsql ssl connection is not compatible with openssl 3.2.0. See:

pgsql 16.2 has fixed this bug, now it's working.

When pgsql uses SSL connection, there may be error:80000002:system library::No such file or directory error, For details on the solution, see FAQ - Unable to use ssl.

openssl

When using openssl-based extensions (such as curl, pgsql and other network libraries), there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

password-argon2

  1. password-argon2 is not a standard extension, it is an additional algorithm for the password_hash function.
  2. On Linux systems, password-argon2 dependency libargon2 conflicts with the libsodium library.

ffi

  1. Due to the limitation of musl libc's static linkage, you cannot use ffi because dynamic libraries cannot be loaded. If you need to use the ffi extension, see Compile PHP with GNU libc.
  2. macOS supports the ffi extension, but errors will occur when some kernels do not contain debugging symbols.
  3. Windows x64 supports the ffi extension.

xhprof

The xhprof extension consists of three parts: xhprof_extension, xhprof_html, xhprof_libs. Only xhprof_extension is included in the compiled binary. If you need to use xhprof, please download the source code from pecl.php.net/package/xhprof and specify the xhprof_libs and xhprof_html paths for use.

event

If you enable event extension on macOS, the openpty will be disabled due to issue:

parallel

Parallel is only supported on PHP 8.0 ZTS and above.

spx

  1. SPX does not support Windows, and the official repository does not support static compilation. static-php-cli uses a modified version.

mimalloc

  1. This is not technically an extension, but a library.
  2. Building with --with-libs="mimalloc" on Linux or macOS will override the default allocator.
  3. This is experimental for now, but is recommended in threaded environments.

Released under the MIT License.

- +
Skip to content

Extension Notes

Because it is a static compilation, extensions will not compile 100% perfectly, and different extensions have different requirements for PHP and the environment, which will be listed one by one here.

curl

HTTP3 support is not enabled by default, compile with --with-libs="nghttp2,nghttp3,ngtcp2" to enable HTTP3 support for PHP >= 8.4.

When using curl to request HTTPS, there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

phpmicro

  1. Only PHP >= 8.0 is supported.

swoole

  1. swoole >= 5.0 Only PHP >= 8.0 is supported.
  2. swoole Currently, curl hooks are not supported for PHP 8.0.x (which may be fixed in the future).
  3. When compiling, if only swoole extension is included, the supported Swoole database coroutine hook will not be fully enabled. If you need to use it, please add the corresponding swoole-hook-xxx extension.
  4. The zend_mm_heap corrupted problem may occur in swoole under some extension combinations. The cause has not yet been found.

swoole-hook-pgsql

swoole-hook-pgsql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-pgsql, you will enable Swoole's PostgreSQL client and the coroutine mode of the pdo_pgsql extension.

swoole-hook-pgsql conflicts with the pdo_pgsql extension. If you want to use Swoole and pdo_pgsql, please delete the pdo_pgsql extension and enable swoole and swoole-hook-pgsql. This extension contains an implementation of the coroutine environment for pdo_pgsql.

On macOS systems, pdo_pgsql may not be able to connect to the postgresql server normally, please use it with caution.

swoole-hook-mysql

swoole-hook-mysql is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-mysql, you will enable the coroutine mode of Swoole's mysqlnd and pdo_mysql.

swoole-hook-sqlite

swoole-hook-sqlite is not an extension, it's a Hook feature of Swoole. If you use swoole,swoole-hook-sqlite, you will enable the coroutine mode of Swoole's pdo_sqlite (Swoole must be 5.1 or above).

swoole-hook-sqlite conflicts with the pdo_sqlite extension. If you want to use Swoole and pdo_sqlite, please delete the pdo_sqlite extension and enable swoole and swoole-hook-sqlite. This extension contains an implementation of the coroutine environment for pdo_sqlite.

swow

  1. Only PHP 8.0+ is supported.

imagick

  1. OpenMP support is disabled, this is recommended by the maintainers and also the case system packages.

imap

  1. Kerberos is not supported
  2. ext-imap is not thread safe due to the underlying c-client. It's not possible to use it in --enable-zts builds.
  3. The extension was dropped from php 8.4, we recommend you look for an alternative implementation, such as Webklex/php-imap

gd

  1. gd Extension relies on more additional Graphics library. By default, using bin/spc build gd directly will not support some Graphics library, such as libjpeg, libavif, etc. Currently, it supports four libraries: freetype,libjpeg,libavif,libwebp. Therefore, the following command can be used to introduce them into the gd library:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. Currently not supported, and this extension will not be supported in the future. #32

oci8

  1. oci8 is an extension of the Oracle database, because the library on which the extension provided by Oracle does not provide a statically compiled version (.a) or source code, and this extension cannot be compiled into php by static linking, so it cannot be supported.

xdebug

  1. Xdebug is only buildable as a shared extension. On Linux, you'll need to use a SPC_TARGET like native-native -dynamic or native-native-gnu.
  2. When using Linux/glibc or macOS, you can compile Xdebug as a shared extension using --build-shared="xdebug". The compiled ./php binary can be configured and run by specifying the INI, eg ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php.

xml

  1. xml includes xml, xmlreader, xmlwriter, xsl, dom, simplexml, etc. When adding xml extensions, it is best to enable these extensions at the same time.
  2. libxml is included in xml extension. Enabling xml is equivalent to enabling libxml.

glfw

  1. glfw depends on OpenGL, and linux environment also needs X11, which cannot be linked statically.
  2. macOS platform, we can compile and link system builtin OpenGL and related libraries dynamically.

rar

  1. The rar extension currently has a problem when compiling phpmicro with the common extension collection in the macOS x86_64 environment.

pgsql

pgsql ssl connection is not compatible with openssl 3.2.0. See:

pgsql 16.2 has fixed this bug, now it's working.

When pgsql uses SSL connection, there may be error:80000002:system library::No such file or directory error, For details on the solution, see FAQ - Unable to use ssl.

openssl

When using openssl-based extensions (such as curl, pgsql and other network libraries), there may be an error:80000002:system library::No such file or directory error. For details on the solution, see FAQ - Unable to use ssl.

password-argon2

  1. password-argon2 is not a standard extension. The algorithm PASSWORD_ARGON2ID for the password_hash function needs libsodium or libargon2 to work.
  2. using password-argon2 enables multithread support for this.

ffi

  1. Due to the limitation of musl libc's static linkage, you cannot use ffi because dynamic libraries cannot be loaded. If you need to use the ffi extension, see Compile PHP with GNU libc.
  2. macOS supports the ffi extension, but errors will occur when some kernels do not contain debugging symbols.
  3. Windows x64 supports the ffi extension.

xhprof

The xhprof extension consists of three parts: xhprof_extension, xhprof_html, xhprof_libs. Only xhprof_extension is included in the compiled binary. If you need to use xhprof, please download the source code from pecl.php.net/package/xhprof and specify the xhprof_libs and xhprof_html paths for use.

event

If you enable event extension on macOS, the openpty will be disabled due to issue:

parallel

Parallel is only supported on PHP 8.0 ZTS and above.

spx

  1. SPX does not support Windows, and the official repository does not support static compilation. static-php-cli uses a modified version.

mimalloc

  1. This is not technically an extension, but a library.
  2. Building with --with-libs="mimalloc" on Linux or macOS will override the default allocator.
  3. This is experimental for now, but is recommended in threaded environments.

Released under the MIT License.

+ \ No newline at end of file diff --git a/en/guide/extensions.html b/en/guide/extensions.html index 20d082b3..15f29301 100644 --- a/en/guide/extensions.html +++ b/en/guide/extensions.html @@ -13,14 +13,14 @@ - - + +
Skip to content

Extensions

  • yes: supported
  • blank: not supported yet, or WIP
  • no with issue link: confirmed to be unavailable due to issue
  • partial with issue link: supported but not perfect due to issue
Extension NameLinuxmacOSFreeBSDWindows
amqpyesyesyes
apcuyesyesyesyes
astyesyesyesyes
bcmathyesyesyesyes
brotliyesyesyesyes
bz2yesyesyesyes
calendaryesyesyesyes
ctypeyesyesyesyes
curlyesyesyesyes
dbayesyesyesyes
dioyesyesyes
domyesyesyes
dsyesyesyesyes
enchant
evyesyesyesyes
eventyesyes
exifyesyesyesyes
ffipartialyesyes
fileinfoyesyesyesyes
filteryesyesyesyes
ftpyesyesyesyes
gdyesyesyes
gettextyesyes
glfwnoyesno
gmpyesyes
gmsslyesyesyes
grpcyesyes
iconvyesyesyes
igbinaryyesyesyes
imagickyesyes
imapyesyes
inotifyyesnono
intlyesyesyes
ldapyesyes
libxmlyesyesyes
lz4yesyes
mbregexyesyesyesyes
mbstringyesyesyesyes
mcryptnononono
memcacheyesyes
memcachedyesyes
mongodbyesyes
msgpackyesyesyes
mysqliyesyesyesyes
mysqlndyesyesyesyes
oci8nonono
odbcyesyes
opcacheyesyesyesyes
opensslyesyesyesyes
opentelemetryyesyesyes
parallelyesyesyes
password-argon2yesyes
pcntlyesyesyesno
pdoyesyesyesyes
pdo_mysqlyesyesyesyes
pdo_odbcyesyesyes
pdo_pgsqlyesyesyes
pdo_sqliteyesyesyes
pdo_sqlsrvyesyesyes
pgsqlyesyesyes
pharyesyesyesyes
posixyesyesyesno
protobufyesyes
raryespartialyes
rdkafkayesyes
readlineyesyes
redisyesyesyes
sessionyesyesyesyes
shmopyesyesyesyes
simdjsonyesyesyesyes
simplexmlyesyesyes
snappyyesyes
soapyesyesyes
socketsyesyesyesyes
sodiumyesyesyes
spxyesyesno
sqlite3yesyesyes
sqlsrvyesyesyes
ssh2yesyesyes
swooleyesyesno
swoole-hook-mysqlyesyesno
swoole-hook-pgsqlyespartialno
swoole-hook-sqliteyesyesno
swowyesyesyes
sysvmsgyesyesno
sysvsemyesyesno
sysvshmyesyesyes
tidyyesyes
tokenizeryesyesyesyes
uuidyesyes
uvyesyes
xdebugpartialpartialno
xhprofyesyes
xlswriteryesyesyes
xmlyesyesyes
xmlreaderyesyesyes
xmlwriteryesyesyes
xslyesyes
xzyesyesyesyes
yacyesyesyes
yamlyesyesyes
zipyesyesyes
zlibyesyesyesyes
zstdyesyes

TIP

If an extension you need is missing, you can create a Feature Request.

Some extensions or libraries that the extension depends on will have some optional features. For example, the gd library optionally supports libwebp, freetype, etc. If you only use bin/spc build gd --build-cli they will not be included (static-php-cli defaults to the minimum dependency principle).

For more information about optional libraries, see Extensions, Library Dependency Map. For optional libraries, you can also select an extension from the Command Generator and then select optional libraries.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/guide/index.html b/en/guide/index.html index 3f1bf59f..a1001319 100644 --- a/en/guide/index.html +++ b/en/guide/index.html @@ -19,7 +19,7 @@
Skip to content

Guide

Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.

In the guide section, you will learn how to use static php cli to build standalone PHP programs.

Compilation Environment

The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.

x86_64aarch64
macOS⚙️ 💻⚙️ 💻
Linux⚙️ 💻⚙️ 💻
Windows⚙️ 💻
FreeBSD💻💻

Among them, Linux is currently only tested on Ubuntu, Debian, and Alpine distributions, and other distributions have not been tested, which cannot guarantee successful compilation. For untested distributions, local compilation can be done using methods such as Docker to avoid environmental issues.

There are two architectures for macOS: x86_64 and Arm, but binaries compiled on one architecture cannot be directly used on the other architecture. Rosetta 2 cannot guarantee that programs compiled with Arm architecture can fully run on x86_64 environment.

Windows currently only supports the x86_64 architecture, and does not support 32-bit x86 or arm64 architecture.

Supported PHP Version

Currently, static php cli supports PHP versions 8.1 to 8.4, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/guide/manual-build.html b/en/guide/manual-build.html index 52b9be05..99d488e0 100644 --- a/en/guide/manual-build.html +++ b/en/guide/manual-build.html @@ -218,7 +218,7 @@ ./embed # out: Hello world! - + \ No newline at end of file diff --git a/en/guide/troubleshooting.html b/en/guide/troubleshooting.html index a94d4aad..aa51fe7f 100644 --- a/en/guide/troubleshooting.html +++ b/en/guide/troubleshooting.html @@ -19,7 +19,7 @@
Skip to content

Troubleshooting

Various failures may be encountered in the process of using static-php-cli, here will describe how to check the errors by yourself and report Issue.

Download Failure

Problems with downloading resources are one of the most common problems with spc. The main reason is that the addresses used for SPC download resources are generally the official website of the corresponding project or GitHub, etc., and these websites may occasionally go down and block IP addresses. After encountering a download failure, you can try to call the download command multiple times.

When downloading extensions, you may eventually see errors like curl: (56) The requested URL returned error: 403 which are often caused by github rate limiting. You can verify this by adding --debug to the command and will see something like [DEBU] Running command (no output) : curl -sfSL "https://api.github.com/repos/openssl/openssl/releases".

To fix this, create a personal access token on GitHub and set it as an environment variable GITHUB_TOKEN=<XXX>.

If you confirm that the address is indeed inaccessible, you can submit an Issue or PR to update the url or download type.

Doctor Can't Fix Something

In most cases, the doctor module can automatically repair and install missing system environments, but there are also special circumstances where the automatic repair function cannot be used normally.

Due to system limitations (for example, software such as Visual Studio cannot be automatically installed under Windows), the automatic repair function cannot be used for some projects. When encountering a function that cannot be automatically repaired, if you encounter the words Some check items can not be fixed, it means that it cannot be automatically repaired. Please submit an issue according to the method displayed on the terminal or repair the environment yourself.

Compile Error

When you encounter a compilation error, if the --debug log is not enabled, please enable the debug log first, and then determine the command that reported the error. The error terminal output is very important for fixing compilation errors. When submitting an issue, please upload the last error fragment of the terminal log (or the entire terminal log output), and include the spc command and parameters used.

If you are rebuilding, please refer to the Local Build - Multiple Builds section.

Released under the MIT License.

- + \ No newline at end of file diff --git a/en/index.html b/en/index.html index 7b4312b0..5f243d07 100644 --- a/en/index.html +++ b/en/index.html @@ -19,7 +19,7 @@
Skip to content

static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.

Released under the MIT License.

- + \ No newline at end of file diff --git a/extension-notes.html b/extension-notes.html index 4f97904c..978a1acb 100644 --- a/extension-notes.html +++ b/extension-notes.html @@ -19,7 +19,7 @@
Skip to content

Released under the MIT License.

- + \ No newline at end of file diff --git a/extensions.html b/extensions.html index 4d470ce9..18756078 100644 --- a/extensions.html +++ b/extensions.html @@ -19,7 +19,7 @@
Skip to content
Extension NameLinuxmacOSFreeBSDWindows
amqpyesyesyes
apcuyesyesyesyes
astyesyesyesyes
bcmathyesyesyesyes
brotliyesyesyesyes
bz2yesyesyesyes
calendaryesyesyesyes
ctypeyesyesyesyes
curlyesyesyesyes
dbayesyesyesyes
dioyesyesyes
domyesyesyes
dsyesyesyesyes
enchant
evyesyesyesyes
eventyesyes
exifyesyesyesyes
ffipartialyesyes
fileinfoyesyesyesyes
filteryesyesyesyes
ftpyesyesyesyes
gdyesyesyes
gettextyesyes
glfwnoyesno
gmpyesyes
gmsslyesyesyes
grpcyesyes
iconvyesyesyes
igbinaryyesyesyes
imagickyesyes
imapyesyes
inotifyyesnono
intlyesyesyes
ldapyesyes
libxmlyesyesyes
lz4yesyes
mbregexyesyesyesyes
mbstringyesyesyesyes
mcryptnononono
memcacheyesyes
memcachedyesyes
mongodbyesyes
msgpackyesyesyes
mysqliyesyesyesyes
mysqlndyesyesyesyes
oci8nonono
odbcyesyes
opcacheyesyesyesyes
opensslyesyesyesyes
opentelemetryyesyesyes
parallelyesyesyes
password-argon2yesyes
pcntlyesyesyesno
pdoyesyesyesyes
pdo_mysqlyesyesyesyes
pdo_odbcyesyesyes
pdo_pgsqlyesyesyes
pdo_sqliteyesyesyes
pdo_sqlsrvyesyesyes
pgsqlyesyesyes
pharyesyesyesyes
posixyesyesyesno
protobufyesyes
raryespartialyes
rdkafkayesyes
readlineyesyes
redisyesyesyes
sessionyesyesyesyes
shmopyesyesyesyes
simdjsonyesyesyesyes
simplexmlyesyesyes
snappyyesyes
soapyesyesyes
socketsyesyesyesyes
sodiumyesyesyes
spxyesyesno
sqlite3yesyesyes
sqlsrvyesyesyes
ssh2yesyesyes
swooleyesyesno
swoole-hook-mysqlyesyesno
swoole-hook-pgsqlyespartialno
swoole-hook-sqliteyesyesno
swowyesyesyes
sysvmsgyesyesno
sysvsemyesyesno
sysvshmyesyesyes
tidyyesyes
tokenizeryesyesyesyes
uuidyesyes
uvyesyes
xdebugpartialpartialno
xhprofyesyes
xlswriteryesyesyes
xmlyesyesyes
xmlreaderyesyesyes
xmlwriteryesyesyes
xslyesyes
xzyesyesyesyes
yacyesyesyes
yamlyesyesyes
zipyesyesyes
zlibyesyesyesyes
zstdyesyes

Released under the MIT License.

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index f5c2f242..e47be4a6 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"deps-craft-yml.md":"DWPKeuXi","deps-map-ext.md":"C_51TV4x","deps-map-lib.md":"DOtBR8NX","en_contributing_index.md":"C8tXDL1f","en_develop_craft-yml.md":"BDq8uWIr","en_develop_doctor-module.md":"DYVfKght","en_develop_index.md":"DSlquryN","en_develop_php-src-changes.md":"DadHFaGC","en_develop_source-module.md":"CeJEgS_j","en_develop_structure.md":"D1kBTweh","en_develop_system-build-tools.md":"DK4AaCy_","en_faq_index.md":"DnHLgGcl","en_guide_action-build.md":"BCJvLz8l","en_guide_build-on-windows.md":"CG23CkLK","en_guide_build-with-glibc.md":"BDBCsGWa","en_guide_cli-generator.md":"akPhNfSm","en_guide_deps-map.md":"Cy-sDexB","en_guide_env-vars.md":"DzVATbtO","en_guide_extension-notes.md":"4_zoofny","en_guide_extensions.md":"DoDM8sGI","en_guide_index.md":"BE1G5v55","en_guide_manual-build.md":"9IRiOUoX","en_guide_troubleshooting.md":"BvJgQKvb","en_index.md":"kO-e39M0","extension-notes.md":"DkpYDq7p","extensions.md":"I66dgmMR","index.md":"wJBxKTzp","zh_contributing_index.md":"22akXfoC","zh_develop_craft-yml.md":"Dfv1fXuq","zh_develop_doctor-module.md":"B8r2lbU8","zh_develop_index.md":"DecU9Y3b","zh_develop_php-src-changes.md":"CkjaMIky","zh_develop_source-module.md":"DoBnezP5","zh_develop_structure.md":"DStJTsYD","zh_develop_system-build-tools.md":"CxPkPV_h","zh_faq_index.md":"nE1d0aPt","zh_guide_action-build.md":"CYeVjGhJ","zh_guide_build-on-windows.md":"6JBREABQ","zh_guide_build-with-glibc.md":"CGbU937o","zh_guide_cli-generator.md":"CDDiynmK","zh_guide_deps-map.md":"DrAYlntu","zh_guide_env-vars.md":"DqYHbUfS","zh_guide_extension-notes.md":"9Fmfx-hb","zh_guide_extensions.md":"C1BoYsnJ","zh_guide_index.md":"8F3ztbe5","zh_guide_manual-build.md":"CrFA3mm-","zh_guide_troubleshooting.md":"DSUIb51x","zh_index.md":"DcikGFee"} +{"deps-craft-yml.md":"DWPKeuXi","deps-map-ext.md":"C_51TV4x","deps-map-lib.md":"DOtBR8NX","en_contributing_index.md":"C8tXDL1f","en_develop_craft-yml.md":"BDq8uWIr","en_develop_doctor-module.md":"DYVfKght","en_develop_index.md":"DSlquryN","en_develop_php-src-changes.md":"DadHFaGC","en_develop_source-module.md":"CeJEgS_j","en_develop_structure.md":"D1kBTweh","en_develop_system-build-tools.md":"DK4AaCy_","en_faq_index.md":"DnHLgGcl","en_guide_action-build.md":"BCJvLz8l","en_guide_build-on-windows.md":"CG23CkLK","en_guide_build-with-glibc.md":"BDBCsGWa","en_guide_cli-generator.md":"bbOqH_9G","en_guide_deps-map.md":"Cy-sDexB","en_guide_env-vars.md":"DzVATbtO","en_guide_extension-notes.md":"qcRlR4zd","en_guide_extensions.md":"DZTyKBB9","en_guide_index.md":"BE1G5v55","en_guide_manual-build.md":"9IRiOUoX","en_guide_troubleshooting.md":"BvJgQKvb","en_index.md":"kO-e39M0","extension-notes.md":"DkpYDq7p","extensions.md":"I66dgmMR","index.md":"wJBxKTzp","zh_contributing_index.md":"22akXfoC","zh_develop_craft-yml.md":"Dfv1fXuq","zh_develop_doctor-module.md":"B8r2lbU8","zh_develop_index.md":"DecU9Y3b","zh_develop_php-src-changes.md":"CkjaMIky","zh_develop_source-module.md":"DoBnezP5","zh_develop_structure.md":"DStJTsYD","zh_develop_system-build-tools.md":"CxPkPV_h","zh_faq_index.md":"nE1d0aPt","zh_guide_action-build.md":"CYeVjGhJ","zh_guide_build-on-windows.md":"6JBREABQ","zh_guide_build-with-glibc.md":"CGbU937o","zh_guide_cli-generator.md":"DneI8j6p","zh_guide_deps-map.md":"DrAYlntu","zh_guide_env-vars.md":"DqYHbUfS","zh_guide_extension-notes.md":"BkfCboVT","zh_guide_extensions.md":"CXcHOBWO","zh_guide_index.md":"8F3ztbe5","zh_guide_manual-build.md":"CrFA3mm-","zh_guide_troubleshooting.md":"DSUIb51x","zh_index.md":"DcikGFee"} diff --git a/index.html b/index.html index 15dd3bf8..59a6498d 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@
Skip to content

static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.

Special Sponsors

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/contributing/index.html b/zh/contributing/index.html index d5476bdc..da436f5b 100644 --- a/zh/contributing/index.html +++ b/zh/contributing/index.html @@ -19,7 +19,7 @@
Skip to content

贡献指南

感谢你能够看到这里,本项目非常欢迎你的贡献!

贡献方法

如果你有代码或文档要贡献,以下是你需要首先了解的内容。

  1. 你要贡献什么类型的代码?(新扩展、修复 Bug、安全问题、项目框架优化、文档)
  2. 如果你贡献了新文件或新片段,你的代码是否经过 php-cs-fixerphpstan 的检查?
  3. 在贡献代码前是否充分阅读了 开发指南

如果你能回答上述问题并对代码进行了修改,可以及时在项目 GitHub 仓库发起 Pull Request。 代码审查完成后,可以根据建议修改代码,或直接合并到主分支。

贡献类型

本项目的主要目的是编译静态链接的 PHP 二进制文件,命令行处理功能基于 symfony/console 编写。 在开发之前,如果你对它不够熟悉,请先查看 symfony/console 文档

安全更新

因为本项目基本上是一个本地运行的 PHP 项目,一般来说不会有远程攻击。 但如果你发现此类问题,请不要在 GitHub 仓库提交 PR 或 Issue, 你需要通过 邮件 联系项目维护者(crazywhalecc)。

修复 Bug

修复 Bug 一般不涉及项目结构和框架的修改,所以如果你能定位到错误代码并直接修复它,请直接提交 PR。

新扩展

对于添加新扩展,你需要了解项目的一些基本结构以及如何根据现有逻辑添加新扩展。 这将在本页的下一节中详细介绍。 总的来说,你需要:

  1. 评估扩展是否可以内联编译到 PHP 中。
  2. 评估扩展的依赖库(如果有)是否可以静态编译。
  3. 编写不同平台的库编译命令。
  4. 验证扩展及其依赖项与现有扩展和依赖项兼容。
  5. 验证扩展在 climicrofpmembed SAPIs 中正常工作。
  6. 编写文档并添加你的扩展。

项目框架优化

如果你已经熟悉 symfony/console 的工作原理,并同时要对项目的框架进行一些修改或优化,请先了解以下事情:

  1. 添加扩展不属于项目框架优化,但如果你在添加新扩展时发现必须优化框架,则需要先修改框架本身,然后再添加扩展。
  2. 对于一些大规模逻辑修改(例如涉及 LibraryBase、Extension 对象等的修改),建议先提交 Issue 或 Draft PR 进行讨论。
  3. 在项目早期,它是一个纯私有开发项目,代码中有一些中文注释。项目国际化后,你可以提交 PR 将这些注释翻译为英语。
  4. 请不要在代码中提交更多无用的代码片段,例如大量未使用的变量、方法、类以及多次重写的代码。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/develop/craft-yml.html b/zh/develop/craft-yml.html index a9d1b234..b6463003 100644 --- a/zh/develop/craft-yml.html +++ b/zh/develop/craft-yml.html @@ -86,7 +86,7 @@ extra-env: # e.g. Use github token to avoid rate limit GITHUB_TOKEN: your-github-token - + \ No newline at end of file diff --git a/zh/develop/doctor-module.html b/zh/develop/doctor-module.html index f9e88dee..63294d8c 100644 --- a/zh/develop/doctor-module.html +++ b/zh/develop/doctor-module.html @@ -47,7 +47,7 @@ } return true; }

#[AsFixItem()] 属性传入的参数即修复项的名称,该方法必须返回 True 或 False。当返回 False 时,表明自动修复失败,需要手动处理。

此处的代码中 shell()->exec() 是项目的执行命令的方法,用于替代 exec()system(),同时提供了 debug、获取执行状态、进入目录等特性。

- + \ No newline at end of file diff --git a/zh/develop/index.html b/zh/develop/index.html index ce4097b2..2f95655a 100644 --- a/zh/develop/index.html +++ b/zh/develop/index.html @@ -19,7 +19,7 @@
Skip to content

开发简介

开发本项目需要安装部署 PHP 环境,以及一些 PHP 项目常用的扩展和 Composer。

项目的开发环境和运行环境几乎完全一致。你可以参照 手动构建 部分安装系统 PHP 或使用本项目预构建的静态 PHP 作为环境。这里不再赘述。

抛开用途,本项目本身其实就是一个 php-cli 程序,你可以将它当作一个正常的 PHP 项目进行编辑和开发,同时你需要了解不同系统的 Shell 命令行。

本项目目前的目的就是为了编译静态编译的独立 PHP,但主体部分也包含编译很多依赖库的静态版本,所以你可以复用这套编译逻辑,用于构建其他程序的独立二进制版本,例如 Nginx 等。

环境准备

开发本项目需要 PHP 环境。你可以使用系统自带的 PHP,也可以使用本项目构建的静态 PHP。

无论是使用哪种 PHP,在开发环境,你需要安装这些扩展:

curl,dom,filter,mbstring,openssl,pcntl,phar,posix,sodium,tokenizer,xml,xmlwriter

static-php-cli 项目本身不需要这么多扩展,但在开发过程中,你会用到 Composer 和 PHPUnit 等工具,它们需要这些扩展。

对于 static-php-cli 自身构建的 micro 自执行二进制,仅需要 pcntl,posix,mbstring,tokenizer,phar

开始开发

继续向下查看项目结构文档,你可以学习 static-php-cli 是如何工作的。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/develop/php-src-changes.html b/zh/develop/php-src-changes.html index fbdf171f..e05e7dd4 100644 --- a/zh/develop/php-src-changes.html +++ b/zh/develop/php-src-changes.html @@ -19,7 +19,7 @@
Skip to content

对 PHP 源码的修改

由于 static-php-cli 在静态编译过程中为了实现良好的兼容性、性能和安全性,对 PHP 源码进行了一些修改。下面是目前对 PHP 源码修改的说明。

micro 相关补丁

基于 phpmicro 项目提供的补丁,static-php-cli 对 PHP 源码进行了一些修改,以适应静态编译的需求。补丁列表 包含:

目前 static-php-cli 在编译时用到的补丁有:

  • static_opcache
  • static_extensions_win32
  • cli_checks
  • disable_huge_page
  • vcruntime140
  • win32
  • zend_stream
  • cli_static
  • macos_iconv
  • phar

PHP <= 8.1 libxml 补丁

因为 PHP 官方仅对 8.1 进行安全更新,旧版本停止更新,所以 static-php-cli 对 PHP 8.1 及以下版本应用了在新版本 PHP 中已经应用的 libxml 编译补丁。

gd 扩展 Windows 补丁

在 Windows 下编译 gd 扩展需要大幅改动 config.w32 文件,static-php-cli 对 gd 扩展进行了一些修改,使其在 Windows 下编译更加方便。

yaml 扩展 Windows 补丁

yaml 扩展在 Windows 下编译需要修改 config.w32 文件,static-php-cli 对 yaml 扩展进行了一些修改,使其在 Windows 下编译更加方便。

static-php-cli 版本信息插入

static-php-cli 在编译时会在 PHP 版本信息中插入 static-php-cli 的版本信息,以便于识别。

加入硬编码 INI 的选项

在使用 -I 参数硬编码 INI 到静态 PHP 的功能中,static-php-cli 会修改 PHP 源码以插入硬编码内容。

Linux 系统修复补丁

部分编译环境可能缺少一些头文件或库,static-php-cli 会在编译时自动修复这些问题,如:

  • HAVE_STRLCAT missing problem
  • HAVE_STRLCPY missing problem

Windows 系统下 Fiber 问题修复补丁

在 Windows 下编译 PHP 时,Fiber 扩展会出现一些问题,static-php-cli 会在编译时自动修复这些问题(修改 php-src 的 config.w32)。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/develop/source-module.html b/zh/develop/source-module.html index d2756cc9..3eaf1cf7 100644 --- a/zh/develop/source-module.html +++ b/zh/develop/source-module.html @@ -138,7 +138,7 @@ } } } - + \ No newline at end of file diff --git a/zh/develop/structure.html b/zh/develop/structure.html index 3fce328a..a331e104 100644 --- a/zh/develop/structure.html +++ b/zh/develop/structure.html @@ -28,7 +28,7 @@ box.json # 打包 Phar 的配置文件 another-app.php # 另一个项目的入口文件 vendor/crazywhalecc/static-php-cli/* # 你的项目被作为依赖库

将该目录 /home/example/another-app/ 下的这些文件打包为 app.phar 时,对于你的项目而言,下面常量的值应为:

ConstantValue
WORKING_DIR/home/example/another-app
SOURCE_ROOT_DIRphar:///home/example/another-app/app.phar/
FRAMEWORK_ROOT_DIRphar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli
__DIR__phar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli/src/App
__FILE__phar:///home/example/another-app/app.phar/vendor/crazywhalecc/static-php-cli/src/App/MyCommand.php
- + \ No newline at end of file diff --git a/zh/develop/system-build-tools.html b/zh/develop/system-build-tools.html index 32b2771e..8d87091b 100644 --- a/zh/develop/system-build-tools.html +++ b/zh/develop/system-build-tools.html @@ -85,7 +85,7 @@ make TARGET=x86_64-linux-musl -j make TARGET=x86_64-linux-musl install -j tar cvzf x86_64-musl-toolchain.tgz output/*

TIP

以上所有脚本都适用于 x86_64 架构的 Linux。如果你需要构建 ARM 环境的 musl-cross-make,只需要将上方所有 x86_64 替换为 aarch64 即可。

这个编译过程可能会因为内存不足、网络问题等原因导致编译失败,你可以多尝试几次,或者使用更大内存的机器来编译。 如果遇到了问题,或者你有更好的改进方案,可以在 讨论 中提出。

macOS 环境编译工具

对于 macOS 系统来说,我们使用的编译工具主要是 clang,它是 macOS 系统默认的编译器,同时也是 Xcode 的编译器。

在 macOS 下编译,主要依赖于 Xcode 或 Xcode Command Line Tools,你可以在 App Store 下载 Xcode,或者在终端执行 xcode-select --install 来安装 Xcode Command Line Tools。

此外,在 doctor 环境检查模块中,static-php-cli 会检查 macOS 系统是否安装了 Homebrew、编译工具等,如果没有,会提示你安装,这里不再赘述。

FreeBSD 环境编译工具

FreeBSD 也是 Unix 系统,它的编译工具和 macOS 类似,你可以直接使用包管理 pkg 安装 clang 等编译工具,通过 doctor 命令。

pkg-config 编译

如果你在使用 static-php-cli 构建静态 PHP 时仔细观察编译的日志,你会发现无论编译什么,都会先编译 pkg-config,这是因为 pkg-config 是一个用于查找依赖库的工具。 在早期的 static-php-cli 版本中,我们直接使用了包管理安装的 pkg-config 工具,但是这样会导致一些问题,例如:

为了避免以上问题,我们将 pkg-config 编译到用户态的 buildroot/bin 内并使用,使用了 --without-sysroot 等参数来避免从系统路径中查找依赖包。

- + \ No newline at end of file diff --git a/zh/faq/index.html b/zh/faq/index.html index 03033b8e..1a941a29 100644 --- a/zh/faq/index.html +++ b/zh/faq/index.html @@ -22,7 +22,7 @@ bin/spc-gnu-docker build ffi,xml --build-cli --debug buildroot/bin/php -d "zend_extension=/path/to/php{PHP_VER}-{ts/nts}/xdebug.so" --ri xdebug

对于 macOS 平台,macOS 下的几乎所有二进制文件都无法真正纯静态链接,几乎所有二进制文件都会链接 macOS 系统库:/usr/lib/libresolv.9.dylib/usr/lib/libSystem.B.dylib。 因此,在 macOS 上,你可以直接使用 SPC 构建具有动态链接扩展的静态编译 PHP 二进制文件:

  1. 使用 --build-shared=XXX 选项构建共享扩展 xxx.so。例如:bin/spc build bcmath,zlib --build-shared=xdebug --build-cli
  2. 你将获得 buildroot/modules/xdebug.sobuildroot/bin/php
  3. xdebug.so 文件可用于版本和线程安全相同的 php。

可以支持 Oracle 数据库扩展吗?

部分依赖库闭源的扩展,如 oci8sourceguardian 等,它们没有提供纯静态编译的依赖库文件(.a),仅提供了动态依赖库文件(.so), 这些扩展无法使用源码的形式编译到 static-php-cli 中,所以本项目可能永远也不会支持这些扩展。不过,理论上你可以根据上面的问题在 macOS 和 Linux 下接入和使用这类扩展。

如果你对此类扩展有需求,或者大部分人都对这些闭源扩展使用有需求, 可以看看有关 standalone-php-cli 的讨论。欢迎留言。

支持 Windows 吗?

该项目目前支持 Windows,但支持的扩展数量较少。Windows 支持并不完美。主要有以下问题:

  1. Windows 的编译过程与 *nix 不同,使用的工具链也不同。用于编译每个扩展依赖库的编译工具也几乎完全不同。
  2. Windows 版本的需求也会根据所有使用本项目的人的需求推进。如果很多人需要,我会尽快支持相关扩展。

我可以使用 micro 保护我的源代码吗?

不可以。micro.sfx 本质上是将 php 和 php 代码合并为一个文件,没有编译或加密 PHP 代码的过程。

首先,php-src 是 PHP 代码的官方解释器,市场上没有与主流分支兼容的 PHP 编译器。 我在网上看到一个名为 BPC(Binary PHP Compiler?)的项目可以将 PHP 编译为二进制,但有很多限制。

加密和保护代码的方向与编译不同。编译后,也可以通过逆向工程等方法获得代码。真正的保护仍然通过打包和加密代码等手段进行。

因此,本项目(static-php-cli)和相关项目(lwmbs、swoole-cli)都提供了 php-src 源代码的便捷编译工具。 本项目和相关项目引用的 phpmicro 只是 PHP 的 sapi 接口封装,而不是 PHP 代码的编译工具。 PHP 代码的编译器是一个完全不同的项目,因此不考虑额外的情况。 如果你对加密感兴趣,可以考虑使用现有的加密技术,如 Swoole Compiler、Source Guardian 等。

无法使用 ssl

更新:该问题已在最新版本的 static-php-cli 中修复,现在默认读取系统的证书文件。如果你仍然遇到问题,请尝试下面的解决方案。

使用 curl、pgsql 等请求 HTTPS 网站或建立 SSL 连接时,可能会出现 error:80000002:system library::No such file or directory 错误。 此错误是由于静态编译的 PHP 未通过 php.ini 指定 openssl.cafile 导致的。

你可以通过在使用 PHP 前指定 php.ini 并在 INI 中添加 openssl.cafile=/path/to/your-cert.pem 来解决此问题。

对于 Linux 系统,你可以从 curl 官方网站下载 cacert.pem 文件,也可以使用系统自带的证书文件。 有关不同发行版的证书位置,请参考 Golang 文档

INI 配置 openssl.cafile 不能使用 ini_set() 函数动态设置,因为 openssl.cafilePHP_INI_SYSTEM 类型的配置,只能在 php.ini 文件中设置。

为什么不支持旧版本的 PHP?

因为旧版本的 PHP 有很多问题,如安全问题、性能问题和功能问题。此外,许多旧版本的 PHP 与最新的依赖库不兼容,这也是不支持旧版本 PHP 的原因之一。

你可以使用 static-php-cli 早期编译的旧版本,如 PHP 8.0,但不会明确支持早期版本。

- + \ No newline at end of file diff --git a/zh/guide/action-build.html b/zh/guide/action-build.html index 5d241157..9050de8d 100644 --- a/zh/guide/action-build.html +++ b/zh/guide/action-build.html @@ -19,7 +19,7 @@
Skip to content

Action 构建

Action 构建指的是直接使用 GitHub Action 进行编译。

如果你不想自行编译,可以从本项目现有的 Action 下载 Artifact,也可以从自托管的服务器下载:进入

自托管的二进制也是由 Action 构建而来,项目仓库地址。 包含的扩展有:bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip

构建方法

使用 GitHub Action 可以方便地构建一个静态编译的 PHP 和 phpmicro,同时可以自行定义要编译的扩展。

  1. Fork 本项目。
  2. 进入项目的 Actions,选择 CI 开头的 Workflow(根据你需要的操作系统选择)。
  3. 选择 Run workflow,填入你要编译的 PHP 版本、目标类型、扩展列表。(扩展列表使用英文逗号分割,例如 bcmath,curl,mbstring
  4. 等待大约一段时间后,进入对应的任务中,获取 Artifacts

如果你选择了 debug,则会在构建时输出所有日志,包括编译的日志,以供排查错误。

如果你需要在其他环境构建,可以使用 手动构建

扩展选择

你可以到 扩展列表 中查看目前你需要的扩展是否均支持, 然后到 在线命令生成 中选择你需要编译的扩展,复制扩展字符串到 Action 的 extensions 中,编译即可。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/guide/build-on-windows.html b/zh/guide/build-on-windows.html index b6d2b27c..c14e6065 100644 --- a/zh/guide/build-on-windows.html +++ b/zh/guide/build-on-windows.html @@ -40,7 +40,7 @@ bin/spc micro:combine code.php -O my-app.exe # Run it!!! Copy it to another computer!!! ./my-app.exe

如果打包 PHAR 文件,仅需把 code.php 更换为 phar 文件路径即可。 你可以使用 box-project/box 将你的 CLI 项目打包为 Phar, 然后将它与 phpmicro 结合,生成独立可执行的二进制文件。

有关 micro:combine 命令的更多细节,请参考 Unix 系统上的 命令

- + \ No newline at end of file diff --git a/zh/guide/build-with-glibc.html b/zh/guide/build-with-glibc.html index 30701cf2..7878e34f 100644 --- a/zh/guide/build-with-glibc.html +++ b/zh/guide/build-with-glibc.html @@ -19,7 +19,7 @@
Skip to content

构建 glibc 兼容的 Linux 二进制

为什么要构建 glibc 兼容的二进制

目前,static-php-cli 在默认条件下在 Linux 系统构建的二进制都是基于 musl-libc(静态链接)的。 musl-libc 是一个轻量级的 libc 实现,它的目标是与 glibc 兼容,并且提供良好的纯静态链接支持。 这意味着,编译出来的静态 PHP 可执行文件在几乎任何 Linux 发行版都可以使用,而不需要考虑 libc、libstdc++ 等库的版本问题。

但是,Linux 系统的纯静态链接 musl-libc 二进制文件存在以下问题:

  • 无法使用 PHP 的 dl() 函数加载动态链接库和外部 PHP 扩展。
  • 无法使用 PHP 的 FFI 扩展。
  • 部分极端情况下,可能会出现性能问题,参见 musl-libc 的性能问题

对于不同的 Linux 发行版,它们使用的默认 libc 可能不同,比如 Alpine Linux 使用 musl libc,而大多数 Linux 发行版使用 glibc。 但即便如此,我们也不能直接使用任意的发行版和 glibc 构建便携的静态二进制文件,因为 glibc 有一些问题:

  • 基于新版本的发行版在使用 gcc 等工具构建的二进制,无法在旧版本的发行版上运行。
  • glibc 不推荐被静态链接,因为它的一些特性需要动态链接库的支持。

但是,我们可以使用 Docker 容器来解决这个问题,最终输出的结果是一个动态链接 glibc 和一些必要库的二进制,但它静态链接所有其他依赖。

  1. 使用一个旧版本的 Linux 发行版(如 CentOS 7.x),它的 glibc 版本比较旧,但是可以在大多数现代 Linux 发行版上运行。
  2. 在这个容器中构建 PHP 的静态二进制文件,这样就可以在大多数现代 Linux 发行版上运行了。

使用 glibc 的静态二进制文件,可以在大多数现代 Linux 发行版上运行,但是不能在 musl libc 的发行版上运行,如 CentOS 6、Alpine Linux 等。

构建 glibc 兼容的 Linux 二进制

最新版的 static-php-cli 内置了 bin/spc-gnu-docker 脚本,可以一键创建一个 CentOS 7.x (glibc-2.17) 的 Docker 容器,并在容器中构建 glibc 兼容的 PHP 静态二进制文件。

然后,先运行一次以下命令。首次运行时时间较长,因为需要下载 CentOS 7.x 的镜像和一些编译工具。

bash
bin/spc-gnu-docker

构建镜像完成后,你将看到和 bin/spc 一样的命令帮助菜单,这时说明容器已经准备好了。

在容器准备好后,你可以参考 本地构建 章节的内容,构建你的 PHP 静态二进制文件。仅需要把 bin/spc./spc 替换为 bin/spc-gnu-docker 即可。

bash
bin/spc-gnu-docker build bcmath,ctype,openssl,pdo,phar,posix,session,tokenizer,xml,zip --build-cli --debug

注意事项

极少数情况下,基于 glibc 的静态 PHP 可能会出现 segment fault 等错误,但目前例子较少,如果遇到问题请提交 issue。

glibc 构建为扩展的特性,不属于默认 static-php 的支持范围。如果有相关问题或需求,请在提交 Issue 时注明你是基于 glibc 构建的。

如果你需要不使用 Docker 构建基于 glibc 的二进制,请参考 bin/spc-gnu-docker 脚本,手动构建一个类似的环境。

请注意,我们仅支持使用 bin/spc-gnu-docker 构建的 glibc 版本。已在 RHEL 9 和 10 上进行了编译测试并验证其稳定性,但如果您遇到问题,我们可能不会进行修复。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/guide/cli-generator.html b/zh/guide/cli-generator.html index 6b8c0ce4..0bfabde3 100644 --- a/zh/guide/cli-generator.html +++ b/zh/guide/cli-generator.html @@ -13,8 +13,8 @@ - - + + @@ -25,7 +25,7 @@ sapi: cli build-options: prefer-pre-built: true - + \ No newline at end of file diff --git a/zh/guide/deps-map.html b/zh/guide/deps-map.html index 8f2e1e37..56eff903 100644 --- a/zh/guide/deps-map.html +++ b/zh/guide/deps-map.html @@ -19,7 +19,7 @@
Skip to content

依赖关系图表

在编译 PHP 时,每个扩展、库都有依赖关系,这些依赖关系可能是必需的,也可能是可选的。在编译 PHP 时,可以选择是否包含这些可选的依赖关系。

例如,在 Linux 下编译 gd 扩展时,会强制编译 zlib,libpng 库和 zlib 扩展,而 libavif,libwebp,libjpeg,freetype 库都是可选的库,默认不会编译,除非通过 --with-libs=avif,webp,jpeg,freetype 选项指定。

  • 对于可选扩展(扩展的可选特性),需手动在编译时指定,例如启用 Redis 的 igbinary 支持:bin/spc build redis,igbinary
  • 对于可选库,需通过 --with-libs=XXX 选项编译指定。
  • 如果想启用所有的可选扩展,可以使用 bin/spc build redis --with-suggested-exts 参数。
  • 如果想启用所有的可选库,可以使用 --with-suggested-libs 参数。

扩展的依赖图

Linux

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvpcntlunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

macOS

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqplibrabbitmq
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
domlibxml2
zlib
evsockets
eventopensslsocketslibevent
ffilibffi
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gettextgettext
glfwglfw
gmpgmp
gmsslgmssl
grpcgrpc
iconvlibiconv
igbinarysession
apcu
imagickimagemagick
imapopensslimap
intlicu
ldapopensslldapgmp
libsodium
libxmlxml
lz4liblz4
mbregexmbstringonig
memcachezlib
session
memcachedsession
zlib
libmemcached
fastlz
mongodbicu
openssl
zstd
zlib
msgpacksession
mysqlimysqlnd
mysqlndzlib
odbcunixodbc
opensslzlibopenssl
zlib
password-argon2libargon2
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
unixodbc
pdo_pgsqlpdo
pgsql
postgresql
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql
pharzlib
rdkafkalibrdkafka
readlinereadline
redissession
igbinary
zstd
liblz4
simplexmllibxml2
snappyapcusnappy
soaplibxml2
sodiumlibsodium
spxzlib
sqlite3sqlite
sqlsrvunixodbc
ssh2openssl
zlib
libssh2
swooleopenssl
curl
swoole-hook-pgsql
swoole-hook-mysql
swoole-hook-sqlite
libcares
brotli
nghttp2
zlib
swoole-hook-mysqlmysqlnd
pdo
pdo_mysql
mysqli
swoole-hook-pgsqlpgsql
pdo
swoole-hook-sqlitesqlite3
pdo
swowopenssl
curl
openssl
curl
tidytidy
uuidlibuuid
uvsocketslibuv
xhprofctype
xlswriterzlib
zip
openssl
xmllibxml2
xmlreaderlibxml2
xmlwriterlibxml2
xslxml
dom
libxslt
xzxz
yacigbinaryfastlz
yamllibyaml
ziplibzip
zlibzlib
zstdzstd

Windows

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
amqpopenssllibrabbitmq
brotlibrotli
bz2bzip2
curlzlib
openssl
curl
dbaqdbm
domxmllibxml2
zlib
evsockets
ffilibffi-win
ftpopenssl
gdzlibzlib
libpng
libavif
libwebp
libjpeg
freetype
gmsslgmssl
iconvlibiconv-win
igbinarysession
apcu
intlicu-static-win
libxmlxml
mbregexmbstringonig
msgpacksession
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
parallelpthreads4w
pdo_mysqlpdo
mysqlnd
pdo_odbcpdo
odbc
pdo_pgsqlpdo
pgsql
postgresql-win
pdo_sqlitepdo
sqlite3
sqlite
pdo_sqlsrvpdo
sqlsrv
pgsqlpostgresql-win
pharzlib
redissession
igbinary
simplexmlxmllibxml2
soapxmllibxml2
sodiumlibsodium
sqlite3sqlite
ssh2openssl
zlib
libssh2
swowopenssl
curl
openssl
curl
xlswriterzlib
zip
openssl
xmliconvlibxml2
xmlreaderxml
dom
libxml2
xmlwriterxmllibxml2
xzxz
yamllibyaml
zipzlib
bz2
libzip
zlib
bzip2
xz
zlibzlib

FreeBSD

Extension NameRequired ExtensionsSuggested ExtensionsRequired LibrariesSuggested Libraries
brotlibrotli
bz2bzip2
curlcurl
dbaqdbm
evsockets
ftpopenssl
mbregexmbstringonig
mysqlimysqlnd
mysqlndzlib
opensslzlibopenssl
zlib
pdo_mysqlpdo
mysqlnd
pharzlib
xzxz
zlibzlib

库的依赖表

Linux

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libaclattr
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

macOS

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
freetypezliblibpng
bzip2
brotli
gettextlibiconvncurses
libxml2
grpczlib
openssl
libcares
imagemagickzlib
libjpeg
libjxl
libpng
libwebp
freetype
libtiff
libheif
bzip2
zstd
xz
libzip
libxml2
imapopenssl
ldapopenssl
zlib
gmp
libsodium
libeventopenssl
libheiflibde265
libwebp
libaom
zlib
brotli
libjxlbrotli
libjpeg
libpng
libwebp
libpngzlib
librabbitmqopenssl
librdkafkazstd
libssh2openssl
libtiffzlib
libjpeg
lerc
libwebp
jbig
xz
zstd
libxml2libiconvxz
icu
zlib
libxsltlibxml2
libzipzlibbzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib
postgresqllibiconv
libxml2
openssl
zlib
readline
icu
libxslt
ldap
zstd
readlinencurses
snappyzlib
unixodbclibiconv
xzlibiconv

Windows

Library NameRequired LibrariesSuggested Libraries
curlzlib
libssh2
nghttp2
brotli
zstd
freetypezliblibpng
bzip2
brotli
libjpegzlib
libpngzlib
librabbitmqopenssl
libssh2openssl
libxml2libiconv-winzlib
libzipzlib
bzip2
xz
zstd
openssl
nghttp2zlib
openssl
libxml2
nghttp3
ngtcp2
nghttp3openssl
ngtcp2opensslnghttp3
brotli
opensslzlib

FreeBSD

Library NameRequired LibrariesSuggested Libraries
curlopenssl
zlib
libssh2
brotli
nghttp2
nghttp3
ngtcp2
zstd
libcares
ldap
opensslzlib

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/guide/env-vars.html b/zh/guide/env-vars.html index 266b8bb8..e66249ac 100644 --- a/zh/guide/env-vars.html +++ b/zh/guide/env-vars.html @@ -30,7 +30,7 @@ [linux] SPC_DEFAULT_C_FLAGS="-O3"

编译依赖库的环境变量(仅限 Unix 系统)

从 2.2.0 开始,static-php-cli 对所有 macOS、Linux、FreeBSD 等 Unix 系统的编译依赖库的命令均支持自定义环境变量。

这样你就可以随时通过环境变量来调整编译依赖库的行为。例如你可以通过 xxx_CFLAGS=-O0 来设置编译 xxx 库的优化参数。

当然,不是每个依赖库都支持注入环境变量,我们目前提供了三个通配的环境变量,后缀分别为:

前缀为依赖库的名称,具体依赖库的名称以 lib.json 为准。其中,带有 - 的依赖库名称需要将 - 替换为 _

下面是一个替换 openssl 库编译的优化选项示例:

shell
openssl_CFLAGS="-O0"

库名称使用同 lib.json 中列举的名称,区分大小写。

TIP

当未指定相关环境变量时,除以下变量外,其余值均默认为空:

var namevar default value
pkg_config_CFLAGSmacOS: $SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion, Other: empty
pkg_config_LDFLAGSLinux: --static, Other: empty
imagemagick_LDFLAGSLinux: -static, Other: empty
imagemagick_LIBSmacOS: -liconv, Other: empty
ldap_LDFLAGS-L$BUILD_LIB_PATH
openssl_CFLAGSLinux: $SPC_DEFAULT_C_FLAGS, Other: empty
others...empty

下表是支持自定义以上三种变量的依赖库名称列表:

lib name
brotli
bzip
curl
freetype
gettext
gmp
imagemagick
ldap
libargon2
libavif
libcares
libevent
openssl

TIP

因为给每个库适配自定义环境变量是一项特别繁琐的工作,且大部分情况下你都不需要这些库的自定义环境变量,所以我们目前只支持了部分库的自定义环境变量。

如果你需要自定义环境变量的库不在上方列表,可以通过 GitHub Issue 来提出需求。

- + \ No newline at end of file diff --git a/zh/guide/extension-notes.html b/zh/guide/extension-notes.html index c772e936..5c110c47 100644 --- a/zh/guide/extension-notes.html +++ b/zh/guide/extension-notes.html @@ -13,13 +13,13 @@ - + -
Skip to content

扩展注意事项

因为是静态编译,扩展不会 100% 完美编译,而且不同扩展对 PHP、环境都有不同的要求,这里将一一列举。

curl

HTTP3 支持默认未启用,需在编译时添加 --with-libs="nghttp2,nghttp3,ngtcp2" 以启用 PHP 8.4 及以上版本的 HTTP3 支持。

使用 curl 请求 HTTPS 时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

phpmicro

  1. phpmicro SAPI 仅支持 PHP >= 8.0 版本。

swoole

  1. swoole >= 5.0 版本仅支持 PHP >= 8.0 版本。
  2. swoole 目前不支持 PHP 8.0 版本 curl 的 hook(后续有可能会修复)。
  3. 编译时只包含 swoole 扩展时不会完整开启支持的 Swoole 数据库协程 hook,如需使用请加入对应的 swoole-hook-xxx 扩展。
  4. swoole 在部分扩展组合下可能出现 zend_mm_heap corrupted 问题,暂未找到是什么原因导致的。

swoole-hook-pgsql

swoole-hook-pgsql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-pgsql,你将启用 Swoole 的 PostgreSQL 客户端和 pdo_pgsql 扩展的协程模式。

swoole-hook-pgsql 与 pdo_pgsql 扩展冲突。如需使用 Swoole 和 pdo_pgsql,请删除 pdo_pgsql 扩展,启用 swooleswoole-hook-pgsql 即可。 该扩展包含了 pdo_pgsql 的协程环境的实现。

在 macOS 系统,pdo_pgsql 可能无法正常连接到 postgresql 服务器,请谨慎使用。

swoole-hook-mysql

swoole-hook-mysql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-mysql,你将启用 Swoole 的 mysqlndpdo_mysql 的协程模式。

swoole-hook-sqlite

swoole-hook-sqlite 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-sqlite,你将启用 Swoole 的 pdo_sqlite 的协程模式(Swoole 必须为 5.1 以上)。

swoole-hook-sqlite 与 pdo_sqlite 扩展冲突。如需使用 Swoole 和 pdo_sqlite,请删除 pdo_sqlite 扩展,启用 swooleswoole-hook-sqlite 即可。 该扩展包含了 pdo_sqlite 的协程环境的实现。

swow

  1. swow 仅支持 PHP 8.0 ~ 8.4 版本。

imagick

imagick 扩展目前仅在 musl libc 上支持 OpenMP(libgomp)。使用 glibc 方式构建的 imagick 扩展无法支持多线程特性。

imap

  1. 该扩展目前不支持 Kerberos。
  2. 由于底层的 c-client、ext-imap 不是线程安全的。 无法在 --enable-zts 构建中使用它。
  3. 由于该扩展可能会从未来的 PHP 中删除,因此我们建议您寻找替代实现,例如 Webklex/php-imap

gd

  1. gd 扩展依赖了较多的额外图形库,默认情况下,直接使用 bin/spc build gd 不会引入和支持部分图形库,例如 libjpeglibavif 等, 需要使用 --with-libs 参数补全。目前支持 freetype,libjpeg,libavif,libwebp 四个库的支持,所以这里可以使用以下命令来让 gd 库引入它们:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. 目前未支持,未来也不计划支持此扩展。#32

oci8

  1. oci8 是 Oracle 数据库的扩展,因为 Oracle 提供的扩展所依赖的库未提供静态编译版本(.a)或源代码,无法使用静态链接的方式将此扩展编译到 php 内,故无法支持。

xdebug

  1. Xdebug 只能作为共享扩展进行构建。您需要使用除了 musl-static 外的其他 SPC_TARGET 构建目标。
  2. 使用 Linux/glibc 或 macOS 时,您可以使用 --build-shared=xdebug 将 Xdebug 编译为共享扩展。 编译后的 ./php 二进制文件可以通过指定 INI 文件进行配置和运行,例如 ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php

xml

  1. xml包括 xmlreader、xmlwriter、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。
  2. libxml 包含在 xml 扩展中。 启用 xml 相当于启用 libxml。

glfw

  1. glfw 扩展依赖 OpenGL,在 Linux 平台还依赖 X11 等环境,这些库都无法被轻易地动态链接。
  2. 在 macOS 系统下,我们可以动态链接系统的 OpenGL 和一些相关的库。

rar

  1. rar 扩展目前在 macOS x86_64 环境下与 common 扩展集合编译 phpmicro 存在问题。

pgsql

pgsql ssl 连接与 openssl 3.2.0 不兼容。相关链接:

pgsql 16.2 修复了这个 Bug,现在正常工作了。

在 pgsql 使用 SSL 连接时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

openssl

使用基于 openssl 的扩展(如 curl、pgsql 等网络库)时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

password-argon2

  1. password-argon2不是一个标准的扩展,它是 password_hash 函数的额外算法。
  2. 在Linux系统,password-argon2 的依赖库 libargon2libsodium 库冲突。

ffi

  1. 由于 musl libc 静态链接的限制,无法加载动态库,因此无法使用 ffi。 如果您需要使用 ffi 扩展,请参阅 使用 GNU libc 编译 PHP
  2. macOS 支持 ffi 扩展,但某些内核不包含调试符号时会出现错误。
  3. Windows x64 支持 ffi 扩展。

xhprof

xhprof 扩展包含三部分:xhprof_extensionxhprof_htmlxhprof_libs。编译的二进制中只包含 xhprof_extension。 如果需要使用 xhprof,请到 pecl.php.net/package/xhprof 下载源码,指定 xhprof_libsxhprof_html 路径来使用。

event

event 扩展在 macOS 系统下编译后暂无法使用 openpty 特性。相关 Issue:

parallel

parallel 扩展只支持 PHP 8.0 及以上版本,并只支持 ZTS 构建(--enable-zts)。

spx

  1. SPX 目前不支持 Windows,且官方仓库也不支持静态编译,static-php-cli 使用了 修改版本

mimalloc

  1. 从技术上讲,这不是扩展,而是一个库。
  2. 在 Linux 或 macOS 上使用 --with-libs="mimalloc" 进行构建将覆盖默认分配器。
  3. 目前,这还处于实验阶段,但建议在线程环境中使用。

Released under the MIT License.

- +
Skip to content

扩展注意事项

因为是静态编译,扩展不会 100% 完美编译,而且不同扩展对 PHP、环境都有不同的要求,这里将一一列举。

curl

HTTP3 支持默认未启用,需在编译时添加 --with-libs="nghttp2,nghttp3,ngtcp2" 以启用 PHP 8.4 及以上版本的 HTTP3 支持。

使用 curl 请求 HTTPS 时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

phpmicro

  1. phpmicro SAPI 仅支持 PHP >= 8.0 版本。

swoole

  1. swoole >= 5.0 版本仅支持 PHP >= 8.0 版本。
  2. swoole 目前不支持 PHP 8.0 版本 curl 的 hook(后续有可能会修复)。
  3. 编译时只包含 swoole 扩展时不会完整开启支持的 Swoole 数据库协程 hook,如需使用请加入对应的 swoole-hook-xxx 扩展。
  4. swoole 在部分扩展组合下可能出现 zend_mm_heap corrupted 问题,暂未找到是什么原因导致的。

swoole-hook-pgsql

swoole-hook-pgsql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-pgsql,你将启用 Swoole 的 PostgreSQL 客户端和 pdo_pgsql 扩展的协程模式。

swoole-hook-pgsql 与 pdo_pgsql 扩展冲突。如需使用 Swoole 和 pdo_pgsql,请删除 pdo_pgsql 扩展,启用 swooleswoole-hook-pgsql 即可。 该扩展包含了 pdo_pgsql 的协程环境的实现。

在 macOS 系统,pdo_pgsql 可能无法正常连接到 postgresql 服务器,请谨慎使用。

swoole-hook-mysql

swoole-hook-mysql 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-mysql,你将启用 Swoole 的 mysqlndpdo_mysql 的协程模式。

swoole-hook-sqlite

swoole-hook-sqlite 不是一个扩展,而是 Swoole 的 Hook 特性。 如果你在编译时添加了 swoole,swoole-hook-sqlite,你将启用 Swoole 的 pdo_sqlite 的协程模式(Swoole 必须为 5.1 以上)。

swoole-hook-sqlite 与 pdo_sqlite 扩展冲突。如需使用 Swoole 和 pdo_sqlite,请删除 pdo_sqlite 扩展,启用 swooleswoole-hook-sqlite 即可。 该扩展包含了 pdo_sqlite 的协程环境的实现。

swow

  1. swow 仅支持 PHP 8.0+ 版本。

imagick

  1. OpenMP 支持已被禁用,这是维护者推荐的做法,系统软件包也是如此配置。

imap

  1. 该扩展目前不支持 Kerberos。
  2. 由于底层的 c-client、ext-imap 不是线程安全的。 无法在 --enable-zts 构建中使用它。
  3. 该扩展已在 PHP 8.4 中被移除,因此我们建议您寻找替代实现,例如 Webklex/php-imap

gd

  1. gd 扩展依赖了较多的额外图形库,默认情况下,直接使用 bin/spc build gd 不会引入和支持部分图形库,例如 libjpeglibavif 等, 需要使用 --with-libs 参数补全。目前支持 freetype,libjpeg,libavif,libwebp 四个库的支持,所以这里可以使用以下命令来让 gd 库引入它们:
bash
bin/spc build gd --with-libs=freetype,libjpeg,libavif,libwebp --build-cli

mcrypt

  1. 目前未支持,未来也不计划支持此扩展。#32

oci8

  1. oci8 是 Oracle 数据库的扩展,因为 Oracle 提供的扩展所依赖的库未提供静态编译版本(.a)或源代码,无法使用静态链接的方式将此扩展编译到 php 内,故无法支持。

xdebug

  1. Xdebug 只能作为共享扩展进行构建。您需要使用除了 musl-static 外的其他 SPC_TARGET 构建目标。
  2. 使用 Linux/glibc 或 macOS 时,您可以使用 --build-shared=xdebug 将 Xdebug 编译为共享扩展。 编译后的 ./php 二进制文件可以通过指定 INI 文件进行配置和运行,例如 ./php -d 'zend_extension=/path/to/xdebug.so' your-code.php

xml

  1. xml包括 xmlreader、xmlwriter、dom、simplexml 等,添加 xml 扩展时最好同时启用这些扩展。
  2. libxml 包含在 xml 扩展中。 启用 xml 相当于启用 libxml。

glfw

  1. glfw 扩展依赖 OpenGL,在 Linux 平台还依赖 X11 等环境,这些库都无法被轻易地动态链接。
  2. 在 macOS 系统下,我们可以动态链接系统的 OpenGL 和一些相关的库。

rar

  1. rar 扩展目前在 macOS x86_64 环境下与 common 扩展集合编译 phpmicro 存在问题。

pgsql

pgsql ssl 连接与 openssl 3.2.0 不兼容。相关链接:

pgsql 16.2 修复了这个 Bug,现在正常工作了。

在 pgsql 使用 SSL 连接时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

openssl

使用基于 openssl 的扩展(如 curl、pgsql 等网络库)时,可能存在 error:80000002:system library::No such file or directory 错误, 解决办法详见 FAQ - 无法使用 ssl

password-argon2

  1. password-argon2不是一个标准的扩展。password_hash 函数的 PASSWORD_ARGON2ID 算法需要 libsodium 或 libargon2 才能工作。
  2. 使用 password-argon2 可以为此启用多线程支持。

ffi

  1. 由于 musl libc 静态链接的限制,无法加载动态库,因此无法使用 ffi。 如果您需要使用 ffi 扩展,请参阅 使用 GNU libc 编译 PHP
  2. macOS 支持 ffi 扩展,但某些内核不包含调试符号时会出现错误。
  3. Windows x64 支持 ffi 扩展。

xhprof

xhprof 扩展包含三部分:xhprof_extensionxhprof_htmlxhprof_libs。编译的二进制中只包含 xhprof_extension。 如果需要使用 xhprof,请到 pecl.php.net/package/xhprof 下载源码,指定 xhprof_libsxhprof_html 路径来使用。

event

event 扩展在 macOS 系统下编译后暂无法使用 openpty 特性。相关 Issue:

parallel

parallel 扩展只支持 PHP 8.0 及以上版本,并只支持 ZTS 构建(--enable-zts)。

spx

  1. SPX 目前不支持 Windows,且官方仓库也不支持静态编译,static-php-cli 使用了 修改版本

mimalloc

  1. 从技术上讲,这不是扩展,而是一个库。
  2. 在 Linux 或 macOS 上使用 --with-libs="mimalloc" 进行构建将覆盖默认分配器。
  3. 目前,这还处于实验阶段,但建议在线程环境中使用。

Released under the MIT License.

+ \ No newline at end of file diff --git a/zh/guide/extensions.html b/zh/guide/extensions.html index 9bb92f20..0dd00e84 100644 --- a/zh/guide/extensions.html +++ b/zh/guide/extensions.html @@ -13,14 +13,14 @@ - - + +
Skip to content

扩展列表

  • yes: 已支持
  • 空白: 目前还不支持,或正在支持中
  • no with issue link: 确定不支持或无法支持
  • partial with issue link: 已支持,但是无法完美工作
Extension NameLinuxmacOSFreeBSDWindows
amqpyesyesyes
apcuyesyesyesyes
astyesyesyesyes
bcmathyesyesyesyes
brotliyesyesyesyes
bz2yesyesyesyes
calendaryesyesyesyes
ctypeyesyesyesyes
curlyesyesyesyes
dbayesyesyesyes
dioyesyesyes
domyesyesyes
dsyesyesyesyes
enchant
evyesyesyesyes
eventyesyes
exifyesyesyesyes
ffipartialyesyes
fileinfoyesyesyesyes
filteryesyesyesyes
ftpyesyesyesyes
gdyesyesyes
gettextyesyes
glfwnoyesno
gmpyesyes
gmsslyesyesyes
grpcyesyes
iconvyesyesyes
igbinaryyesyesyes
imagickyesyes
imapyesyes
inotifyyesnono
intlyesyesyes
ldapyesyes
libxmlyesyesyes
lz4yesyes
mbregexyesyesyesyes
mbstringyesyesyesyes
mcryptnononono
memcacheyesyes
memcachedyesyes
mongodbyesyes
msgpackyesyesyes
mysqliyesyesyesyes
mysqlndyesyesyesyes
oci8nonono
odbcyesyes
opcacheyesyesyesyes
opensslyesyesyesyes
opentelemetryyesyesyes
parallelyesyesyes
password-argon2yesyes
pcntlyesyesyesno
pdoyesyesyesyes
pdo_mysqlyesyesyesyes
pdo_odbcyesyesyes
pdo_pgsqlyesyesyes
pdo_sqliteyesyesyes
pdo_sqlsrvyesyesyes
pgsqlyesyesyes
pharyesyesyesyes
posixyesyesyesno
protobufyesyes
raryespartialyes
rdkafkayesyes
readlineyesyes
redisyesyesyes
sessionyesyesyesyes
shmopyesyesyesyes
simdjsonyesyesyesyes
simplexmlyesyesyes
snappyyesyes
soapyesyesyes
socketsyesyesyesyes
sodiumyesyesyes
spxyesyesno
sqlite3yesyesyes
sqlsrvyesyesyes
ssh2yesyesyes
swooleyesyesno
swoole-hook-mysqlyesyesno
swoole-hook-pgsqlyespartialno
swoole-hook-sqliteyesyesno
swowyesyesyes
sysvmsgyesyesno
sysvsemyesyesno
sysvshmyesyesyes
tidyyesyes
tokenizeryesyesyesyes
uuidyesyes
uvyesyes
xdebugpartialpartialno
xhprofyesyes
xlswriteryesyesyes
xmlyesyesyes
xmlreaderyesyesyes
xmlwriteryesyesyes
xslyesyes
xzyesyesyesyes
yacyesyesyes
yamlyesyesyes
zipyesyesyes
zlibyesyesyesyes
zstdyesyes

TIP

如果缺少您需要的扩展,您可以创建 功能请求

有些扩展或扩展依赖的库会有一些可选的特性,例如 gd 库可选支持 libwebp、freetype 等。 如果你只使用 bin/spc build gd --build-cli 是不会包含它们(static-php-cli 默认为最小依赖原则)。

有关编译可选库,请参考 扩展、库的依赖关系图表。对于可选的库,你也可以从 编译命令生成器 中选择扩展后展开选择可选库。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/guide/index.html b/zh/guide/index.html index 164e6fe1..7f75887b 100644 --- a/zh/guide/index.html +++ b/zh/guide/index.html @@ -19,7 +19,7 @@
Skip to content

指南

static-php-cli 是一个用于构建静态编译的 PHP 二进制的工具,目前支持 Linux 和 macOS 系统。

在指南章节中,你将了解到如何使用 static-php-cli 构建独立的 php 程序。

编译环境

下面是架构支持情况,⚙️ 代表支持 GitHub Action 构建,💻 代表支持本地构建,空 代表暂不支持。

x86_64aarch64
macOS⚙️ 💻⚙️ 💻
Linux⚙️ 💻⚙️ 💻
Windows⚙️ 💻
FreeBSD💻💻

其中,Linux 目前仅在 Ubuntu、Debian、Alpine 发行版测试通过,其他发行版未进行测试,不能保证编译成功。 对于未经过测试的发行版,可以使用 Docker 等方式本地编译,避免环境导致的问题。

macOS 下支持 x86_64 和 Arm 两种架构,但在其中一个架构上编译的二进制无法直接在另一个架构上使用。 Rosetta 2 不能保证 Arm 架构编译的程序可以完全运行在 x86_64 环境下。

Windows 目前只支持 x86_64 架构,不支持 32 位 x86、不支持 arm64 架构。

PHP 支持版本

目前,static-php-cli 对 PHP 8.1 ~ 8.4 版本是支持的,对于 PHP 8.0 及更早版本理论上支持,只需下载时选择早期版本即可。 但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。 我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/guide/manual-build.html b/zh/guide/manual-build.html index 9669bc25..3e274d32 100644 --- a/zh/guide/manual-build.html +++ b/zh/guide/manual-build.html @@ -209,7 +209,7 @@ ./embed # out: Hello world! - + \ No newline at end of file diff --git a/zh/guide/troubleshooting.html b/zh/guide/troubleshooting.html index 8d18f1a5..0f9a5ac1 100644 --- a/zh/guide/troubleshooting.html +++ b/zh/guide/troubleshooting.html @@ -19,7 +19,7 @@
Skip to content

故障排除

使用 static-php-cli 过程中可能会碰到各种各样的故障,这里将讲述如何自行查看错误并反馈 Issue。

下载失败问题

下载资源问题是 spc 最常见的问题之一。主要是由于 spc 下载资源使用的地址一般均为对应项目的官方网站或 GitHub 等,而这些网站可能偶尔会宕机、屏蔽 IP 地址。 在遇到下载失败后,可以多次尝试调用下载命令。

当下载资源时,你可能最终会看到类似 curl: (56) The requested URL returned error: 403 的错误,这通常是由于 GitHub 限制导致的。 你可以通过在命令中添加 --debug 来验证,会看到类似 [DEBU] Running command (no output) : curl -sfSL "https://api.github.com/repos/openssl/openssl/releases" 的输出。

要解决这个问题,可以在 GitHub 上 创建 一个个人访问令牌,并将其设置为环境变量 GITHUB_TOKEN=<XXX>

如果确认地址确实无法正常访问,可以提交 Issue 或 PR 更新地址或下载类型。

Doctor 无法修复某些问题

在绝大部分情况下,doctor 模块都可以对缺失的系统环境进行自动修复和安装,但也存在特殊的环境无法正常使用自动修复功能。

由于系统限制(例如,Windows 下无法自动安装 Visual Studio 等软件),自动修复功能无法用于某些项目。 在遇到无法自动修复功能时,如果遇到 Some check items can not be fixed 字样,则表明无法自动修复。 请根据终端显示的方法提交 Issue 或自行修复环境。

编译错误

遇到编译错误时,如果没有开启 --debug 日志,请先开启调试日志,然后确定报错的命令。 报错的终端输出对于修复编译错误非常重要。 在提交 Issue 时,请上传终端日志的最后报错片段(或整个终端日志输出),并且包含使用的 spc 命令和参数。

如果你是重复构建,请参考 本地构建 - 多次构建 章节。

Released under the MIT License.

- + \ No newline at end of file diff --git a/zh/index.html b/zh/index.html index 6d423424..c449a7de 100644 --- a/zh/index.html +++ b/zh/index.html @@ -19,7 +19,7 @@
Skip to content

static-php-cli

在 Linux、macOS、FreeBSD、Windows 上与 PHP 项目一起构建独立的 PHP 二进制文件,并包含流行的扩展。

Released under the MIT License.

- + \ No newline at end of file