Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via composer

phpunit/php-timer 6.0.0

Utility class for timing
Package summary
Share
0
issues
1
license
1
BSD-3-Clause
Package created
18 Sep 2012
Version published
3 Feb 2023
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
phpunit/php-timer@6.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of phpunit/php-timer 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does phpunit/php-timer do?

The phpunit/php-timer is a highly useful stand-alone component that provides a utility class for timing purposes. Originally part of PHPUnit, this component has considerable functionality and it is beneficial for those who need to time certain processes within their PHP projects, perhaps for performance measurement or timing debugging actions.

How do you use phpunit/php-timer?

To use the phpunit/php-timer, you first need to install the package via Composer. You can add this library as a local per-project dependency using the command composer require phpunit/php-timer. 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 with the command composer require --dev phpunit/php-timer.

Here is a basic example of using phpunit/php-timer for timing:

require __DIR__ . '/vendor/autoload.php';

use SebastianBergmann\Timer\Timer;

$timer = new Timer;

$timer->start();

foreach (\range(0, 100000) as $i) {
    //...
}

$duration = $timer->stop();

var_dump($duration->asSeconds()); // Output the duration in seconds

PHPunit/php-timer also provides functionality to measure resource consumption and duration since PHP startup. For full code samples and usage examples, please refer to the Usage section in the supplied README.

Where are the phpunit/php-timer docs?

The documentation for phpunit/php-timer can be found directly inline within the README.md file which is available in the root of the project's GitHub repository at https://github.com/sebastianbergmann/php-timer. This documentation provides all necessary details including installation instructions, basic usage examples, and detailed functionality descriptions.