最近推送 2026-10-23 14:29(5 天前),属于活跃维护
php/php-src
GITHUB中文整理主语言 C · 41,614 星 · BSD-3-Clause · 创建于 2011-06-16
PHP 解释器。它实现了 PHP 这门通用脚本语言,随附大量内置扩展和完整测试套件,整体以 C 语言编写。
仓库健康度
5 个维度开放 Issue 2,228 个 · Fork 8,333 个
star 记录还不够天数,增量算不出来
许可证 BSD-3-Clause
这一项暂无数据,不代表项目没有发布
「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。
Star 趋势
6 天记录横轴 2026-10-23 → 2026-10-28,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。
它解决什么问题
据 README 归纳网站和后端程序需要一个能直接执行 PHP 代码的运行时环境。没有它,PHP 脚本无法被解析运行,开发者也就无法只靠源码在服务器上跑起自己的应用。
核心能力
5 条- 1解析并执行 PHP 脚本,提供语言运行时
- 2内置大量随附扩展,可在此基础上追加额外扩展
- 3自带完整测试套件,编译后用 make test 校验
- 4支持指定并行任务数来加快编译和测试
- 5支持从源码构建,也提供 Windows 预编译二进制
项目画像
6 个角度项目定位
PHP 解释器。它实现了 PHP 这门通用脚本语言,随附大量内置扩展和完整测试套件,整体以 C 语言编写。
适合谁
需要自行编译或调试 PHP 运行时的开发者、PHP 扩展作者,以及要搭建 PHP 环境或研究解释器实现的人员。
典型场景
在 Linux 类系统上从 Git 源码编译一份 PHP,用于开发或调试解释器本身。;编译完成后运行内置测试套件,确认修改过的源码行为正常。;在 Windows 上直接解压预编译包,快速获得可用的 PHP 可执行文件。;通过 PIE 或 PECL 给 PHP 增加内置扩展之外的附加功能。
部署难度
从源码构建需先装好 autoconf、bison、re2c,默认构建还要 libxml2 和 libsqlite3;之后依次运行 configure、make、make install,安装可能需提权。Windows 可直接用预编译包,门槛较低。
风险限制
从源码构建需要 autoconf、bison、re2c,默认构建还依赖 libxml2 与 libsqlite3;安装可能需要超级用户权限。仅说明 Windows 预编译二进制可从 windows.php.net 获取。
最近维护
最近一次推送是 2026-10-23 14:29。 实现方式:从源码构建时,先运行 configure 生成构建配置,再调用 make 编译出解释器;编译完成后用 make test 执行测试套件,最后通过 make install 安装到目标路径。
README 原文细节
2 个板块怎么安装从零跑起来的步骤
Installing PHP built from source
After a successful build (and test), PHP may be installed with:
Depending on your permissions and prefix, make install may need superuser permissions.
make install
其它说明README 里剩下的内容
Prebuilt packages and binaries
Prebuilt packages and binaries can be used to get up and running fast with PHP.
For Windows, the PHP binaries can be obtained from windows.php.net. After extracting the archive the .exe files are ready to use.
Building PHP source code
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For a default build, you will additionally need libxml2 and libsqlite3.
Configure your build. --enable-debug is recommended for development, see ./configure --help for a full list of options.
Build PHP. To speed up the build, specify the maximum number of jobs using the -j argument:
The number of jobs should usually match the number of available cores, which can be determined using nproc.
Testing PHP source code
PHP ships with an extensive test suite, the command make test is used after successful compilation of the sources to run this test suite.
Tests run in parallel by default, using up to 10 detected logical processors. Set -jN in TESTPHPARGS or TESTS to override the worker count:
This runs make test with a maximum of 4 concurrent jobs. Alternatively, use -j1 to run tests sequentially.
Use the TESTPHPARGS or TESTS variable to test only specific directories:
关于 php-src 的常见问题
7 个问题php-src 是做什么的?
PHP 解释器。它实现了 PHP 这门通用脚本语言,随附大量内置扩展和完整测试套件,整体以 C 语言编写。 网站和后端程序需要一个能直接执行 PHP 代码的运行时环境。没有它,PHP 脚本无法被解析运行,开发者也就无法只靠源码在服务器上跑起自己的应用。
php-src 有哪些功能?
核心能力:解析并执行 PHP 脚本,提供语言运行时;内置大量随附扩展,可在此基础上追加额外扩展;自带完整测试套件,编译后用 make test 校验;支持指定并行任务数来加快编译和测试;支持从源码构建,也提供 Windows 预编译二进制。
php-src 适合谁用?
需要自行编译或调试 PHP 运行时的开发者、PHP 扩展作者,以及要搭建 PHP 环境或研究解释器实现的人员。
php-src 是怎么工作的?
从源码构建时,先运行 configure 生成构建配置,再调用 make 编译出解释器;编译完成后用 make test 执行测试套件,最后通过 make install 安装到目标路径。
怎么安装 php-src?
按项目 README 的说明:After a successful build (and test), PHP may be installed with:;Depending on your permissions and prefix, make install may need superuser permissions.。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。
用 php-src 有什么门槛或限制?
从源码构建需要 autoconf、bison、re2c,默认构建还依赖 libxml2 与 libsqlite3;安装可能需要超级用户权限。仅说明 Windows 预编译二进制可从 windows.php.net 获取。
php-src 现在还在维护吗?数据怎么样?
目前 41,614 星,8,333 个 Fork,主语言 C,创建于 2011-06-16,最近一次推送 2026-10-23 14:29,许可证 BSD-3-Clause。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。
这些内容来自哪
读法说明项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-10-23 17:47。
