mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
Merge branch 'master' of https://fgit.zhamao.me/crazywhalecc/static-php-swoole
Nothing
This commit is contained in:
commit
7ad936f8c2
74
README-en.md
Normal file
74
README-en.md
Normal file
@ -0,0 +1,74 @@
|
||||
# static-php-swoole
|
||||
Compile A Statically Linked PHP With Swoole and other Extensions. [English README](/README-en.md)
|
||||
|
||||
BTW, It's only for CLI mode.
|
||||
|
||||
[]()
|
||||
|
||||
## 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:
|
||||
```bash
|
||||
# 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
|
||||

|
||||
|
||||
Run Swoft framework directly
|
||||

|
||||
|
||||
## Todo List
|
||||
- [X] curl/libcurl extension support
|
||||
- [ ] Alternative extension compiling
|
||||
- [ ] php.ini support
|
||||
- [ ] Make composer together
|
||||
- [ ] i18n
|
||||
|
||||
## References
|
||||
- <https://blog.terrywh.net/post/2019/php-static-openssl/>
|
||||
- <https://stackoverflow.com/a/37245653>
|
||||
- <http://blog.gaoyuan.xyz/2014/04/09/statically-compile-php/>
|
||||
@ -1,4 +1,4 @@
|
||||
# static-php-swoole
|
||||
# static-php-cli
|
||||
Compile A Statically Linked PHP With Swoole and other Extensions. [English README](/README-en.md)
|
||||
|
||||
编译纯静态的 PHP Binary 二进制文件,带有各种扩展(CLI 模式,暂不支持 CGI 和 FPM 模式)
|
||||
@ -9,6 +9,7 @@ Compile A Statically Linked PHP With Swoole and other Extensions. [English READM
|
||||
- 目前在 x86_64 和 aarch64(arm64) 架构上编译成功,其他架构需自行测试
|
||||
- 需要 Alpine Linux(测试环境为 3.13 版本,其他版本未测试)系统(也就是说需要 musl)
|
||||
- WSL2 也是支持的
|
||||
- 脚本支持编译的 PHP 版本 >= 7.3
|
||||
|
||||
## 开始
|
||||
可以直接在旁边的 Release 中下载编译好的二进制,也可以自己编译。
|
||||
@ -16,6 +17,10 @@ Compile A Statically Linked PHP With Swoole and other Extensions. [English READM
|
||||
# 自己编译
|
||||
./static-compile-php.sh
|
||||
# 完事后在 `php-dist/bin/php` 这个二进制文件可以随意拿着去任何一个 Linux 系统运行了!
|
||||
|
||||
# 多 PHP 版本一键编译
|
||||
./multi-version-compile.sh
|
||||
# 结束后多个 PHP 版本的二进制文件会在 build/ 目录下。
|
||||
```
|
||||
|
||||
## 主分支版本
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user