More Resources

Here are some links to helpful resources on writing and contributing phpt tests for the PHP programming language.

Creating new test files

The definitive resource for learning to write phpt tests from the PHP Quality Assurance team.


, phpsp, phpdublin June 2017

Docker tools to easily create and run tests for the PHP-SRC. The intent of this library is to help any PHP developer to create PHPT tests for the language engine and its core extensions.

How to write PHP tests


These slides were created by Sebastian Schürmann for PHP TestFest 2009. They cover phpt tests and the PHP build environment.

Lessons Learned from PHPT Writing

, May 2008

I decided to write this […] to pass the responsibility over to the new testers! But also with the impending TestFests and general focus on testing in the community thought it would be worthwhile to share my knowledge.

PHP Internals Book: Testing PHP Source


In this chapter we’ll explore the test suite that covers the internal functionality of PHP. We’ll cover everything from running the test suite with PHP’s custom black-box testing tool called run-tests.php to creating new tests.

PHPT - Test File Layout

A reference manual for phpt test file layouts.

PHP TestFest VM Documentation

, May 2009

A virtual machine compiled for PHP TestFest 2009 and designed to reduce the hassle of setting up a testing environment for PHP tests. It contains compiled versions of PHP 5.2, 5.3 and 6.0 with a ton of extensions.

test || die

, phplondon 29 Feb 2008

As PHP becomes ever more successful the requirement for stability increases and the freedom to make changes in the core code is correspondingly restricted. Is the test coverage sufficient? Especially given the wide range and depth of change required to implement Unicode support. Based on experience of contributing PHP tests, I’ll talk about tests, coverage and what needs to happen!

Writing Tests for PHP Source

, php[tek] 25 May 2017

This isn’t a talk about adding tests to your PHP codebase, but adding tests to the PHP language itself. And the best part is, all the tests are written in PHP…