Registry / testing / phpunit-php-timer

phpunit-php-timer

JSON →
library9.0.0phppackagistunverified

Utility class for timing code execution.

composer require phpunit/php-timer
INSTALL
IMPORT
SIG · PHPUNIT-PHP-TIMER
P
phpunit-php-timer
testingphpv9.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Timer
use SebastianBergmann\Timer\Timer;

Measure the execution time of a code block.

use SebastianBergmann\Timer\Timer; $timer = new Timer(); $timer->start(); // code to time $duration = $timer->stop(); echo $duration->asString();
Debug
Known issues
breakingPHP Timer 9.0+ requires PHP 8.1+ and uses readonly properties.
fix
Use PHP Timer ^8.0 for PHP 7.3+ compatibility.
affects: >=9.0
Upgrade
Version history
9.0.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
phpunit-php-timer — pip install phpunit-php-timer · libregistry