Sylvain
Sylvain

Reputation: 3070

Generate PHP code coverage without Xdebug

I'm using Xdebug to get some coverage data during my unit tests, but it costs a lot of time (and memory).

Is there any way to get coverage without using Xdebug?

Upvotes: 6

Views: 1517

Answers (1)

Sebastian Bergmann
Sebastian Bergmann

Reputation: 8326

As of PHP 7, you can use PHPDBG instead of Xdebug to collect code coverage information with PHPUnit. However, there will always be a resource penalty (time and memory) when code coverage information is collected.

Upvotes: 14

Related Questions