mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Update docs
This commit is contained in:
parent
e1652a4b36
commit
f04b54bc2a
@ -84,3 +84,11 @@ For Linux systems, you can download the [cacert.pem](https://curl.se/docs/caextr
|
|||||||
For the certificate locations of different distros, please refer to [Golang docs](https://go.dev/src/crypto/x509/root_linux.go).
|
For the certificate locations of different distros, please refer to [Golang docs](https://go.dev/src/crypto/x509/root_linux.go).
|
||||||
|
|
||||||
> 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.
|
> 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.
|
||||||
|
|||||||
@ -46,7 +46,7 @@ This extension contains an implementation of the coroutine environment for `pdo_
|
|||||||
|
|
||||||
## swow
|
## swow
|
||||||
|
|
||||||
1. Only PHP version >= 8.0 is supported.
|
1. Only PHP 8.0 ~ 8.3 is supported.
|
||||||
|
|
||||||
## imap
|
## imap
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Windows currently only supports the x86_64 architecture, and does not support 32
|
|||||||
|
|
||||||
## Supported PHP Version
|
## Supported PHP Version
|
||||||
|
|
||||||
Currently, static php cli supports PHP versions 8.0 to 8.3, and theoretically supports PHP 7.4 and earlier versions.
|
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.
|
Simply select the earlier version when downloading.
|
||||||
However, due to some extensions and special components that have stopped supporting earlier versions of PHP,
|
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.
|
static-php-cli will not explicitly support earlier versions.
|
||||||
|
|||||||
@ -142,9 +142,9 @@ including php-src and the source code of various dependent libraries.
|
|||||||
# Download all dependencies
|
# Download all dependencies
|
||||||
bin/spc download --all
|
bin/spc download --all
|
||||||
|
|
||||||
# Download all dependent packages, and specify the main version of PHP to download, optional: 7.3, 7.4, 8.0, 8.1, 8.2, 8.3
|
# Download all dependent packages, and specify the main version of PHP to download, optional: 8.1, 8.2, 8.3, 8.4
|
||||||
# Also supports specific version of php release: 8.3.10, 8.2.22, etc.
|
# Also supports specific version of php release: 8.3.10, 8.2.22, etc.
|
||||||
bin/spc download --all --with-php=8.2
|
bin/spc download --all --with-php=8.3
|
||||||
|
|
||||||
# Show download progress bar while downloading (curl)
|
# Show download progress bar while downloading (curl)
|
||||||
bin/spc download --all --debug
|
bin/spc download --all --debug
|
||||||
@ -272,12 +272,12 @@ If you want to build multiple versions of PHP and don't want to build other depe
|
|||||||
you can use `switch-php-version` to quickly switch to another version and compile after compiling one version:
|
you can use `switch-php-version` to quickly switch to another version and compile after compiling one version:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# switch to 8.3
|
# switch to 8.4
|
||||||
bin/spc switch-php-version 8.3
|
bin/spc switch-php-version 8.4
|
||||||
# build
|
# build
|
||||||
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
||||||
# switch to 8.0
|
# switch to 8.1
|
||||||
bin/spc switch-php-version 8.0
|
bin/spc switch-php-version 8.1
|
||||||
# build
|
# build
|
||||||
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
||||||
```
|
```
|
||||||
|
|||||||
@ -70,4 +70,10 @@ PHP 代码的编译器是完全不同的项目,因此不会考虑额外的情
|
|||||||
对于 Linux 系统,你可以从 curl 官方网站下载 [cacert.pem](https://curl.se/docs/caextract.html) 文件,也可以使用系统自带的证书文件。
|
对于 Linux 系统,你可以从 curl 官方网站下载 [cacert.pem](https://curl.se/docs/caextract.html) 文件,也可以使用系统自带的证书文件。
|
||||||
有关不同发行版的证书位置,可参考 [Go 标准库](https://go.dev/src/crypto/x509/root_linux.go)。
|
有关不同发行版的证书位置,可参考 [Go 标准库](https://go.dev/src/crypto/x509/root_linux.go)。
|
||||||
|
|
||||||
> INI 配置 `openssl.cafile` 不可以使用 `ini_set()` 函数动态设置,因为 `openssl.cafile` 是一个 `PHP_INI_SYSTEM` 类型的配置,只能在 `php.ini` 文件中设置。
|
> INI 配置 `openssl.cafile` 不可以使用 `ini_set()` 函数动态设置,因为 `openssl.cafile` 是一个 `PHP_INI_SYSTEM` 类型的配置,只能在 `php.ini` 文件中设置。
|
||||||
|
|
||||||
|
## 为什么不支持旧版本 PHP ?
|
||||||
|
|
||||||
|
因为旧版本的 PHP 有很多问题,比如安全问题、性能问题、功能问题等。此外,旧版本的 PHP 很多都无法与最新的依赖库兼容,这也是不支持旧版本 PHP 的原因之一。
|
||||||
|
|
||||||
|
你可以使用 static-php-cli 早期编译好的旧版本,如 PHP 8.0,但是不会明确支持早期版本。
|
||||||
|
|||||||
@ -43,7 +43,7 @@ swoole-hook-sqlite 与 `pdo_sqlite` 扩展冲突。如需使用 Swoole 和 `pdo_
|
|||||||
|
|
||||||
## swow
|
## swow
|
||||||
|
|
||||||
1. swow 仅支持 PHP >= 8.0 版本。
|
1. swow 仅支持 PHP 8.0 ~ 8.3 版本。
|
||||||
|
|
||||||
## imap
|
## imap
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,6 @@ Windows 目前只支持 x86_64 架构,不支持 32 位 x86、不支持 arm64
|
|||||||
|
|
||||||
## PHP 支持版本
|
## PHP 支持版本
|
||||||
|
|
||||||
目前,static-php-cli 对 PHP 7.4 ~ 8.3 版本是支持的,对于 PHP 7.4 及更早版本理论上支持,只需下载时选择早期版本即可。
|
目前,static-php-cli 对 PHP 8.1 ~ 8.4 版本是支持的,对于 PHP 8.0 及更早版本理论上支持,只需下载时选择早期版本即可。
|
||||||
但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。
|
但由于部分扩展和特殊组件已对早期版本的 PHP 停止了支持,所以 static-php-cli 不会明确支持早期版本。
|
||||||
我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。
|
我们推荐你编译尽可能新的 PHP 版本,以获得更好的体验。
|
||||||
|
|||||||
@ -141,8 +141,8 @@ bin/spc download --for-extensions="curl,pcntl,xml,mbstring" --prefer-pre-built
|
|||||||
# 下载所有依赖包
|
# 下载所有依赖包
|
||||||
bin/spc download --all
|
bin/spc download --all
|
||||||
|
|
||||||
# 下载所有依赖包,并指定下载的 PHP 主版本,可选:7.3,7.4,8.0,8.1,8.2,8.3,也可以使用特定的版本,如 8.3.10。
|
# 下载所有依赖包,并指定下载的 PHP 主版本,可选:8.1,8.2,8.3,8.4,也可以使用特定的版本,如 8.3.10。
|
||||||
bin/spc download --all --with-php=8.2
|
bin/spc download --all --with-php=8.3
|
||||||
|
|
||||||
# 下载时显示下载进度条(curl)
|
# 下载时显示下载进度条(curl)
|
||||||
bin/spc download --all --debug
|
bin/spc download --all --debug
|
||||||
@ -236,12 +236,12 @@ bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
|||||||
如果你想构建多个版本的 PHP,且不想每次都重复构建其他依赖库,可以使用 `switch-php-version` 在编译好一个版本后快速切换至另一个版本并编译:
|
如果你想构建多个版本的 PHP,且不想每次都重复构建其他依赖库,可以使用 `switch-php-version` 在编译好一个版本后快速切换至另一个版本并编译:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# switch to 8.3
|
# switch to 8.4
|
||||||
bin/spc switch-php-version 8.3
|
bin/spc switch-php-version 8.4
|
||||||
# build
|
# build
|
||||||
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
||||||
# switch to 8.0
|
# switch to 8.1
|
||||||
bin/spc switch-php-version 8.0
|
bin/spc switch-php-version 8.1
|
||||||
# build
|
# build
|
||||||
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
bin/spc build bcmath,curl,openssl,ftp,posix,pcntl --build-cli
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user