当前版本

TrueAsync 0.6.7

发布日期: 2026-04-14 · 系统要求 PHP 8.6-dev (ZTS)

所有构建均为线程安全版本 (ZTS)。 更新日志 →

历史版本 (7)
版本发布日期系统要求更新日志
TrueAsync 0.6.62026-04-03PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.52026-03-29PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.42026-03-25PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.32026-03-25PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.22026-03-24PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.12026-03-15PHP 8.6-dev (ZTS)更新日志 →
TrueAsync 0.6.02026-03-14PHP 8.6-dev (ZTS)更新日志 →

从源码构建

推荐的 Linux 和 macOS 安装方式。脚本会自动下载 PHP 源码、TrueAsync 扩展并完成编译。

Linux (Ubuntu/Debian)

交互式向导将引导您完成设置:选择扩展、调试模式、安装路径和 PATH 配置。

curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh | bash

Ubuntu、Debian 及其他基于 apt 的发行版。

非交互模式(CI / 自动化)

curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-linux.sh \
  | NO_INTERACTIVE=true EXTENSIONS=all SET_DEFAULT=true bash

macOS

Apple Silicon (ARM) 和 Intel。需要 Homebrew

curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-macos.sh | bash

非交互模式(CI / 自动化)

curl -fsSL https://raw.githubusercontent.com/true-async/releases/master/installer/build-macos.sh \
  | NO_INTERACTIVE=true EXTENSIONS=all SET_DEFAULT=true bash

构建选项

--prefix DIR安装目录(默认 $HOME/.php-trueasync
--set-default作为默认 php 添加到 PATH
--debug使用调试符号构建
--extensions PRESET扩展集:standardxdebugall
--no-interactive跳过交互式向导

安装管理

构建完成后,可使用 php-trueasync 工具:

php-trueasync rebuild从最新源码重新构建
php-trueasync version显示已安装的版本
php-trueasync uninstall卸载 TrueAsync PHP 并清理 PATH

Docker

包含 PHP 和 TrueAsync 的预构建镜像。每个镜像均包含 CLI 和 FPM。

可用镜像

trueasync/php-true-async:0.6.7-php8.6Ubuntu 24.04 — CLI + FPM
trueasync/php-true-async:0.6.7-php8.6-alpineAlpine 3.20 — CLI + FPM (lightweight)
trueasync/php-true-async:0.6.7-php8.6-debugUbuntu 24.04 — CLI + FPM (debug symbols)
trueasync/php-true-async:0.6.7-php8.6-frankenphpUbuntu 24.04 — FrankenPHP (Caddy + async worker)
trueasync/php-true-async:latestUbuntu 24.04 — alias for latest stable
trueasync/php-true-async:latest-alpineAlpine 3.20 — alias for latest stable
trueasync/php-true-async:latest-frankenphpFrankenPHP — alias for latest stable

快速开始

docker pull trueasync/php-true-async:latest
docker run --rm trueasync/php-true-async:latest php -v

运行脚本:

docker run --rm -v $(pwd):/app -w /app trueasync/php-true-async:latest php script.php

在 Dockerfile 中使用

FROM trueasync/php-true-async:latest

COPY . /app
WORKDIR /app

CMD ["php", "server.php"]

Windows

包含 TrueAsync 的预编译 PHP Windows x64 二进制文件。

SHA256 哈希值可在每个发行版的 sha256sums.txt 中找到。

快速安装 (PowerShell)

irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iex
历史版本 (7)
版本发布日期ReleaseDebug
0.6.62026-04-03~38 MB~35 MB
0.6.52026-03-29~38 MB~35 MB
0.6.42026-03-25~25 MB~30 MB
0.6.32026-03-25~37.6 MB~35.1 MB
0.6.22026-03-24~37.6 MB~35.1 MB
0.6.12026-03-15~37.6 MB~35.1 MB
0.6.02026-03-14~37.6 MB~35.1 MB