Build single static PHP binary, with PHP project together, with popular extensions included

Whale d5ee452499 Update README.md 3 years ago
docker 908f7c8b98 update Dockerfile 3 years ago
LICENSE d0a7e24e49 Initial commit 3 years ago
README-en.md cf42a4ee71 Update README-en.md 3 years ago
README.md d5ee452499 Update README.md 3 years ago
multi-version-build.sh cb98414cef 升级到1.2.1版本,修复几个小问题,增加php7.2 3 years ago
static-compile-php.sh 609790ea7b 升级到1.2.1版本,修复几个小问题,增加php7.2,更新swoole依赖版本到4.6.7 3 years ago

README-en.md

static-php-swoole

Compile A Statically Linked PHP With Swoole and other Extensions. English README

BTW, It's only for CLI mode.

[version]()

Requirements

  • Tested on x86_64 and aarch64 platform, others have not tested.
  • Requiring Alpine Linux (version >= 3.13), or requiring musl-libc
  • Support WSL2
  • Supporting PHP version >= 7.3

Start

You can directly download static binary in Release.

Here's help command to compile it yourself:

# Compile script
./static-compile-php.sh
# And now you get `php-dist/bin/php` file!

Library version

  • php: 7.4.18
  • libxml2: 2.9.10
  • curl: 7.76.1

Including PHP extensions

  • bcmath
  • calendar
  • ctype
  • filter
  • openssl
  • pcntl
  • iconv
  • inotify (3.0.0)
  • json
  • mbstring
  • phar
  • curl
  • pdo
  • gd
  • pdo_mysql
  • mysqlnd
  • sockets
  • swoole (4.6.6)
  • redis (5.3.4)
  • simplexml
  • dom
  • xml
  • xmlwriter
  • xmlreader
  • posix
  • tokenizer

Running preview

After-compile status image

Run Swoft framework directly image

Todo List

  • [X] curl/libcurl extension support
  • Alternative extension compiling
  • php.ini support
  • Make composer together
  • i18n

References