Growing the PHP Core One test at a Time
summary
Live-codes a real PHP core test: clones and builds PHP from GitHub, runs make test -j20, and shows runs with ~177k then ~194.5k phpt tests (99.7% passing in one run, four failures in another). Demonstrates the phpt file format, uses the environment-section to set HTTP_ACCEPT_ENCODING because copy-on-write superglobals prevent runtime mutation, and encounters ini_set header restrictions. Writes three tests for zend_get_coding_type (gzip/deflate/none), merges them into PHP, and confirms coverage moves from uncovered to covered.
AI-written summary · about
chapters (12)
- 0:00Introduction to PHP contributions
- 4:40PHP TestFest discovery
- 5:45Setting up PHP test environment
- 7:51Understanding PHPT test format
- 14:16Live PHP test execution demo
- 18:31Writing test for gzip coding type
- 23:12Debugging test failures
- 27:25Investigating PHP internals
- 31:23Lessons learned from testing
- 34:51Benefits of contributing tests
- 35:11Resources for further learning
- 35:40Q&A session
related talks
31mGrowing the PHP Core – One Test at a Time
28mGrowing the PHP Core – One Test at a Time
33mGrowing the PHP Core — One Test at a Time
05mInterview – Gina Peter Banyard
45m30 Years of PHP, 25 Years of Testing: A Journey Through Code and Community
58mTesting Complex Applications for PHP7
26mPHP, Under The Hood
50mBuilding Testable PHP Applications
