A self-contained, high-performance code coverage driver for PHP that's compatible with PHPUnit's CodeCoverage library.
PCOV is a lightweight PHP extension designed specifically for code coverage analysis. It serves as a drop-in replacement for Xdebug's coverage functionality, offering significantly better performance while maintaining compatibility with PHPUnit's CodeCoverage library. It focuses on providing fast, accurate code coverage without the overhead of a full debugging extension.
PHP developers and teams who run unit tests with PHPUnit and need code coverage reports, particularly those experiencing performance issues with Xdebug's coverage mode. It's also suitable for CI/CD pipelines where faster test execution is critical.
Developers choose PCOV over Xdebug for code coverage because it provides comparable accuracy with dramatically lower performance overhead. Its unique selling point is being a zero-cost extension when disabled (pcov.enabled=0) and having minimal impact when enabled, as it's a specialized tool rather than a full debugger.
PCOV - CodeCoverage compatible driver for PHP
PCOV has minimal overhead compared to Xdebug, as it's a lightweight extension under 1000 lines of code focused solely on coverage, leading to faster test execution.
It works seamlessly as a drop-in replacement for Xdebug with PHPUnit's CodeCoverage library, requiring no changes to existing test suites.
When pcov.enabled=0, the extension has no performance impact, allowing it to be safely loaded in production without slowdowns.
Allows filtering by directory and exclude patterns via PCRE, enabling targeted coverage and resource optimization, as shown in the configuration options.
Provides control over arena allocation with functions like \pcov\memory(), helping users fine-tune memory usage for large test suites.
When enabled, PCOV cannot run alongside Xdebug, phpdbg, or Blackfire, forcing a choice between coverage and debugging/profiling tools.
Generates slightly different coverage reports than Xdebug, such as in switch statements, which may cause inconsistencies for teams reliant on Xdebug's output.
Requires compiling and installing a PHP extension via PECL or source, which is more involved than Composer-based libraries and may fail in constrained environments.
Users must manually set options like pcov.initial.memory and pcov.directory to avoid wasted resources, adding setup overhead compared to more automated solutions.
PHP errors for cool kids
Provides mechanisms for walking through any arbitrary PHP variable
Kint - Advanced PHP dumper
PHP Benchmarking framework
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.