Saturday, October 24, 2026 4,350 lists 78,096 records on file
List your app or device

  1. Home
  2. Unit Testing
  3. PHPUnit

PHPUnit

The site's legal notice lists Sebastian Bergmann at an address in Siegburg, Germany.

What it is

PHPUnit is a free testing framework for PHP, with a command-line runner for running tests and choosing test suites. Its assertions cover return values, exceptions, side effects, output, files, JSON, XML, and error-log output. Tests can use data providers and dependencies, and can be organized through filesystem structure or XML configuration. PHPUnit also supports test stubs and mock objects. For coverage and reporting, the manual documents HTML and JSONL coverage reports, along with JUnit and TeamCity logging configuration. To help address flaky tests, it can repeat or retry runs using attributes or command-line options. You can install PHPUnit as a PHAR or as a Composer development dependency. The current stable major release is PHPUnit 13, which requires PHP 8.4 or later. Bug-fix support for that release is listed through February 4, 2028; its end-of-life date is undetermined. The getting-started guide covers writing and running simple unit tests, and documentation is available for supported versions 8.5 through 13.4.

For and against

For

  • Free PHP testing framework
  • Offers PHAR and Composer installation
  • Supports stubs and mock objects
  • Documents HTML and JSONL coverage reports
  • Can repeat or retry tests

Against

  • PHPUnit 13 requires PHP 8.4 or later
  • End-of-life date for PHPUnit 13 is undetermined

The verdict

PHPUnit covers common test structures, assertions, doubles, reports, and command-line execution. Check the PHP requirement for version 13 before installing it.

Who it suits

PHP developers looking for a framework to write and run tests may find PHPUnit suitable. It also suits projects that need test doubles, coverage reports, or retries for unstable tests.

Plans and prices

PHPUnit

Free

PHP testing framework · download as PHAR or install per project with Composer

Every plan, in full

On the record

Assertions
The manual documents assertions for values, exceptions, side effects, output, files, JSON, and XML.docs.phpunit.de · read 4 Oct 2026
Audience
The getting-started guide teaches writing simple unit tests and running them for PHP code.phpunit.de · read 4 Oct 2026
Code coverage
The manual documents code coverage reports in HTML and JSONL formats.docs.phpunit.de · read 4 Oct 2026
Coverage and reports
The manual documents code coverage, HTML and JSONL coverage reports, and JUnit and TeamCity logging configuration.docs.phpunit.de · read 3 Oct 2026
Current PHP requirement
The current stable major version is PHPUnit 13, which requires PHP 8.4 or later.phpunit.de · read 3 Oct 2026
Current release
PHPUnit 13 is listed as the current stable major version.phpunit.de · read 4 Oct 2026
Flaky tests
PHPUnit supports repeating and retrying tests, including through attributes and command-line options.docs.phpunit.de · read 3 Oct 2026
Installation
PHPUnit 13 can be downloaded as a PHAR archive or installed as a per-project development dependency with Composer.phpunit.de · read 4 Oct 2026
Maintainer
The site identifies Sebastian Bergmann as responsible for the website and its editorial content, with an address in Siegburg, Germany.phpunit.de · read 4 Oct 2026
Maintainer and sponsorship
Sebastian Bergmann is PHPUnit's creator and lead maintainer, and says he reviews and validates every change; sponsorship does not buy influence over the roadmap.phpunit.de · read 3 Oct 2026
PHP requirement
PHPUnit 13 requires PHP 8.4 or later.phpunit.de · read 4 Oct 2026
Purpose
PHPUnit is a testing framework for PHP.phpunit.de · read 4 Oct 2026
Release support
PHPUnit 13 receives bug-fix support through February 4, 2028; its end-of-life date is undetermined.phpunit.de · read 3 Oct 2026
Security
The getting-started page links to documentation for verifying PHPUnit PHAR releases.phpunit.de · read 4 Oct 2026
Security verification
The getting-started page directs users to documentation for verifying PHPUnit PHAR releases.phpunit.de · read 3 Oct 2026
Support policy
PHPUnit 13 bugfix support is listed through February 4, 2028, and its end-of-life date is to be determined.phpunit.de · read 4 Oct 2026
Support versions
The site provides documentation for supported PHPUnit versions 8.5 through 13.4.phpunit.de · read 4 Oct 2026
Test assertions
The manual covers tests for return values, exceptions, side effects, output, and error log output.docs.phpunit.de · read 3 Oct 2026

Alternatives to PHPUnit

Every alternative, ranked