当前版本

TrueAsync 0.6.4

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

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

历史版本 (4)
版本 发布日期 系统要求 更新日志
TrueAsync 0.6.3 2026-03-25 PHP 8.6-dev (ZTS) 更新日志 →
TrueAsync 0.6.2 2026-03-24 PHP 8.6-dev (ZTS) 更新日志 →
TrueAsync 0.6.1 2026-03-15 PHP 8.6-dev (ZTS) 更新日志 →
TrueAsync 0.6.0 2026-03-14 PHP 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 添加到 PATH 作为默认 php
--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.4-php8.6 Ubuntu 24.04 — CLI + FPM
trueasync/php-true-async:0.6.4-php8.6-alpine Alpine 3.20 — CLI + FPM (lightweight)
trueasync/php-true-async:0.6.4-php8.6-debug Ubuntu 24.04 — CLI + FPM (debug symbols)
trueasync/php-true-async:latest Ubuntu 24.04 — alias for latest stable
trueasync/php-true-async:latest-alpine Alpine 3.20 — 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 二进制文件。

用于常规使用
调试符号和断言 - 用于 PHP/扩展开发

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

快速安装 (PowerShell)

irm https://raw.githubusercontent.com/true-async/releases/master/installer/install.ps1 | iex
历史版本 (4)
版本 发布日期 Release Debug
0.6.3 2026-03-25 ~37.6 MB ~35.1 MB
0.6.2 2026-03-24 ~37.6 MB ~35.1 MB
0.6.1 2026-03-15 ~37.6 MB ~35.1 MB
0.6.0 2026-03-14 ~37.6 MB ~35.1 MB