Growing the PHP Core – One Test at a Time
summary
Live demo builds PHP from master and runs the bundled test runner with make test -j10 on PHP 8.4, producing a summary of 18,577 suite tests, 30,102 executed, 4 failures, 7 expected failures and a 99.9% success rate in 34s. Explains the .phpt format and sections like --TEST--, --FILE--, --EXPECTF-- and the --ENV-- trick to inject HTTP_ACCEPT_ENCODING (necessary because superglobals use copy‑on‑write). Uses gcov to find uncovered ext/satellite code, adds phpt tests and lands PRs merged in PHP 7.3.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:00Setting up PHP and running tests
- 8:19PHP test structure
- 11:52Finding test areas
- 13:18Test for zlib encoding
- 19:53Debugging failure
- 25:09Lessons learned
- 26:55Benefits of tests
- 28:00Conclusion
related talks
38mGrowing the PHP Core One test at a Time
31mGrowing the PHP Core – One Test at a Time
33mGrowing the PHP Core — One Test at a Time
45m30 Years of PHP, 25 Years of Testing: A Journey Through Code and Community
50mPHP 8.2 - Just upgrade and go?
05mInterview – Gina Peter Banyard
50mBuilding Testable PHP Applications
58mTesting Complex Applications for PHP7
