PHPackages                             phpunit/php-code-coverage - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. phpunit/php-code-coverage

ActiveLibrary[Testing &amp; Quality](/categories/testing)

phpunit/php-code-coverage
=========================

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

13.0.1(3mo ago)8.9k892.4M—5.5%386[6 issues](https://github.com/sebastianbergmann/php-code-coverage/issues)[6 PRs](https://github.com/sebastianbergmann/php-code-coverage/pulls)20BSD-3-ClausePHPPHP &gt;=8.4CI passing

Since Sep 19Pushed today51 watchersCompare

[ Source](https://github.com/sebastianbergmann/php-code-coverage)[ Packagist](https://packagist.org/packages/phpunit/php-code-coverage)[ Docs](https://github.com/sebastianbergmann/php-code-coverage)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ Fund](https://liberapay.com/sebastianbergmann)[ RSS](/packages/phpunit-php-code-coverage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (234)Used By (20)

phpunit/php-code-coverage
=========================

[](#phpunitphp-code-coverage)

[![Latest Stable Version](https://camo.githubusercontent.com/8ecddc356770c8998f5f0a048e292e122f044b818a27c3c2976e9c2675c258c0/68747470733a2f2f706f7365722e707567782e6f72672f706870756e69742f7068702d636f64652d636f7665726167652f76)](https://packagist.org/packages/phpunit/php-code-coverage)[![CI Status](https://github.com/sebastianbergmann/php-code-coverage/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/php-code-coverage/actions)[![codecov](https://camo.githubusercontent.com/d818f77276dfd2ebbd9ad7d358660d5b6faee81173ab3014b8aaa7de6c766a58/68747470733a2f2f636f6465636f762e696f2f67682f73656261737469616e626572676d616e6e2f7068702d636f64652d636f7665726167652f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/sebastianbergmann/php-code-coverage)

Provides collection, processing, and rendering functionality for PHP code coverage information.

Installation
------------

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require phpunit/php-code-coverage

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev phpunit/php-code-coverage

```

Usage
-----

[](#usage)

### Collecting code coverage data and generating a report

[](#collecting-code-coverage-data-and-generating-a-report)

```
