Skip to content

Instantly share code, notes, and snippets.

@tertek
tertek / pcov-code-coverage-windows.md
Last active October 30, 2025 09:49
PHPUnit Code-Coverage with PCOV on Windows (Local Development Environment)

PHPUnit Code-Coverage with PCOV on Windows

Important

This gist is not updated. Please read the comments below.

Download and Install PCOV

  1. Download latest release (currently 1.0.11) for Windows for your version of PHP and the correct format (ts or nts) from PECL
  2. Unzip downloaded package and copy the files php_pcov.dll and php_pcov.pdb to your PHP extensions directory, e.g. C:\bin\php\php-7.4.27-Win32-vc15-x64\ext\
  3. Modify your php.ini so that PCOV is loaded. Therefore add extension=pcov: