mrkeyoor.com_
Tue 01 Sept 17:39 UTC
Webevaluationupdated 26 Aug 2026

php-src review

php-src is the source tree for the PHP interpreter, the runtime behind PHP command-line programs and web applications. Most PHP users should install a packaged binary; this repository is for people building the interpreter, changing its internals, or testing PHP itself.

+38stars / 7d
Verdict

Our php-src configure step failed in 16 seconds because re2c was absent, so a fresh compiler image was not enough to start building PHP. Use this repository when you need to modify, package, or verify the interpreter and are prepared to supply its native toolchain. If the goal is to run PHP applications, install a supported binary package instead.

We ran it

Lab card: what happened when we ran php-srcScreenshot of php-src (www.php.net)
Install✗ · 16s
Build
Repo27570 files~1,408,833 lines of source · 143.2 MB · 13 CI workflows · tests dir

Answers from our run

Does php-src build from source?

The dependency install failed, and the project has no separate build step. We cloned commit a6b1a9e into a clean Debian container with 3 CPUs and no project-specific setup.

Who should not use php-src?

Application developers who only need to run Laravel, WordPress, or a PHP script: the README points ordinary users to prebuilt packages and binaries.

What are the alternatives to php-src?

CPython, Node.js, Ruby. Our php-src configure step failed in 16 seconds because re2c was absent, so a fresh compiler image was not enough to start building PHP.

Setup2/5Configure stopped at 16 seconds because re2c was absent
Docs5/5Build, test, platform, extension, and RFC paths are documented
Community5/540,314 stars with issue and pull request activity on August 26
Maturity5/5PHP 8.5.9 was a current security release in July 2026

Discussed on

  1. hnPHP 7 Released449 points
  2. hnPHP source code now hosted on Github138 points
  3. hnPHP 5.5106 points
  4. hnMy AI-built PHP engine in Rust passes 17% of PHP-src tests, renders WordPress34 points
  5. hnPhp-7 released14 points

Who it’s for

PHP core contributors working on the engine, bundled extensions, or language behavior.
Distribution and platform engineers who need a controlled PHP build.
Extension authors who must test against a particular interpreter checkout.
Runtime researchers who want the implementation and its test suite, rather than an application framework.

Who it’s NOT for

Application developers who only need to run Laravel, WordPress, or a PHP script: the README points ordinary users to prebuilt packages and binaries.
Contributors unwilling to install native build tools: even the minimal Git build requires autoconf, bison, and re2c, and our configure step stopped when re2c was absent.
Teams looking for a container-ready source checkout: the repository has no Dockerfile, and the README gives separate package instructions for Ubuntu, Fedora, macOS, and Windows.
Developers expecting feature proposals to work like ordinary pull requests: the contribution guide says new language features require an accepted RFC and developer vote.

Setup reality

Our sandbox install failed after 16 seconds at commit a6b1a9e. Configure found bison 3.8.2, then stopped because re2c was missing and re2c 1.0.3 or newer is required to generate PHP's lexers. We did not reach a build or test run.

The README does name re2c alongside autoconf and bison for a minimal Git build. A default build also needs libxml2 and libsqlite3, while optional extensions add their own libraries. Building the interpreter itself needs no account, API key, or external service.

Platform instructions differ for Ubuntu, Fedora, macOS, and Windows. A development configure uses --enable-debug; production omits it. Installation may require elevated permissions, and ordinary PHP users can avoid this toolchain by choosing a packaged binary.

php-src is the interpreter, not a PHP application starter

PHP describes php-src as the source code for its general-purpose scripting language. The tree contains the interpreter, bundled extensions, build machinery, and the suite used to check language behavior. It is the right download when a change belongs inside PHP itself. Someone deploying WordPress or writing a Laravel service usually wants a distribution package, a Windows binary, or an official installation path instead. The repository README makes that distinction early, which prevents a common source-build detour.

Our checkout at commit a6b1a9e contained 27,570 files, about 1,408,833 lines of source, and occupied 143.2 MB before a successful build. Those figures explain why this feels different from pulling an application dependency. GitHub classifies the primary language as C, and the repository exposes 13 CI workflow files plus a tests directory. There is no Dockerfile at the root, so the source tree does not promise one container recipe for all supported configurations.

A minimal Git build needs 3 named generator tools

The README names autoconf, bison, and re2c as requirements for a minimal build from Git. A default configuration also needs libxml2 and libsqlite3. Ubuntu, Fedora, macOS with Homebrew or MacPorts, and Windows each receive a distinct path. That is useful documentation, but it also tells you what kind of project this is: native packages and platform details are part of the work before PHP compiles.

Development starts with ./buildconf, followed by ./configure --enable-debug and make. The README recommends matching make -j to the machine's core count. Production configuration drops the debug flag, and make install may require elevated permissions depending on the prefix. None of these steps needs a hosted credential. Optional extension choices can introduce more libraries, so the 3-tool minimum should not be mistaken for a complete package list for every intended PHP build.

What happened when we ran it

Our sandbox reached configure and failed after 16 seconds. The log found bison 3.8.2 and accepted that version, then reported that re2c was missing. Configure stated that re2c 1.0.3 or newer is required to generate the PHP lexers. This is a direct missing-tool result from commit a6b1a9e in an unprivileged Debian container with 3 CPUs and 8 GB of RAM.

Because configure stopped, we did not obtain a build result or a test result. It would be wrong to turn that absence into a compiler or test-suite judgment. The useful finding is narrower: a fresh lab-cpp:1 image did not include every generator php-src requires, even though it had a working compiler and bison. Installing the documented re2c requirement is the next setup step, after which the build has to be assessed on its own evidence.

The test runner can narrow work by directory

After compilation, PHP's documented check is make test. The runner uses as many as 10 detected logical processors by default, while TEST_PHP_ARGS=-j4 caps it at 4 jobs. Contributors can also set TESTS=tests/lang/ or another path to avoid running unrelated areas during a short edit cycle. This is practical for a source tree with 1.4 million measured lines, though a focused run does not replace the complete suite before a runtime change ships.

The contribution process is stricter for language design than for a routine bug fix. New features require an RFC, discussion, acceptance, and a developer vote. Bug fixes do not require an RFC, and the README explains how to reference current GitHub issues or old bugs.php.net tickets in commit messages. That split gives an experienced contributor a clear route, but it makes php-src a poor place for speculative syntax patches that have not passed the project's design process.

PHP 8.5.9 was a security release, and work continued in August

GitHub reported 40,314 stars and 2,014 combined open issues and pull requests when fetched on August 26, 2026. The latest activity list included same-day pull requests touching MySQL connections, tests, memory management, streams, and PostgreSQL behavior, plus an updated JIT crash issue. The repository's last push was also August 26. The combined open count is not a count of confirmed bugs, but the dated issue and pull request activity shows that the tree was being worked on.

The latest GitHub release was PHP 8.5.9, published July 30, 2026. Its release note calls it a security release and tells all PHP 8.5 users to upgrade. That matters for anyone considering a private source build: tracking the supported release line and security updates becomes your responsibility. A one-off successful compile is not a maintenance policy, especially when the runtime sits beneath public web applications.

Packagers should build it; application teams should install PHP

php-src earns high marks for documentation and maturity because the README separates binaries, source builds, tests, extensions, and contribution governance. Our 16-second failure still lowers setup ease for the exact environment tested. The missing re2c requirement was documented, so this was not a mysterious code failure. It was proof that a generic compiler container did not match the project's stated toolchain.

Choose php-src for interpreter development, distribution packaging, extension compatibility work, or a build that must be controlled at the source level. For ordinary deployment, the README's prebuilt route is the better engineering decision. It reduces local toolchain work and makes updates easier to consume. Teams that do build from source should pin the commit, record configure flags, install the named generators, run the relevant tests, and follow the security release stream.

Alternatives

ProjectWhat it isPick it when
CPython gh↗The reference implementation of Python, with its interpreter and standard library.pick this instead when Python's package and language ecosystem fits the application better than PHP.
Node.js gh↗A JavaScript runtime used for servers, scripts, and command-line applications.pick this instead when sharing JavaScript between browser and server matters more than PHP compatibility.
Ruby gh↗The main source repository for the Ruby interpreter and standard library.pick this instead when Ruby or Rails is already the team's chosen application stack.

What people are saying

  1. [velocity-scout] php/php-src

Sources

  1. php-src README
  2. php-src repository activity
  3. PHP 8.5.9 release
  4. PHP RFC process

More web reviews

axios · super-productivity · Graphite · fastify · tabler · go-zero · the whole board →