PackageTrack
Sign in Get early access

phpunit/php-timer

Utility class for timing

9.0.0 948M downloads/mo #52 most downloaded on composer sebastianbergmann/php-timer

What this package is like to depend on

Last release 6 months ago

06 Feb 2026

Release timing varies

gaps range from 3 weeks to 2.2 years

Most releases are documented

notes for 20 of 29 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

29 releases · first in 2012

1 release in the last 12 months

see the full history below

Release timeline

29 releases · Sep 2012 to Feb 2026
2013 2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 29
  1. 9.0.0 06 Feb 2026
    Release notes

    Removed

    • This component is no longer supported on PHP 8.3
    Open source →
    Release notes

    Removed

    • This component is no longer supported on PHP 8.3
    Open source →
  2. 8.0.0 07 Feb 2025
    Release notes

    Removed

    • This component is no longer supported on PHP 8.1
    Open source →
    Release notes

    Removed

    • This component is no longer supported on PHP 8.2
    Open source →
  3. 7.0.1 03 Jul 2024
    Release notes

    Changed

    • This project now uses PHPStan instead of Psalm for static analysis
    Open source →
    Release notes

    Changed

    • This project now uses PHPStan instead of Psalm for static analysis
    Open source →
  4. 7.0.0 02 Feb 2024
    Release notes

    Removed

    • This component is no longer supported on PHP 8.1
    Open source →
  5. 6.0.0 03 Feb 2023
    Release notes

    Removed

    • This component is no longer supported on PHP 7.3, PHP 7.4 and PHP 8.0
    Open source →
  6. 5.0.3 26 Oct 2020
    Release notes

    Fixed

    • SebastianBergmann\Timer\Exception now correctly extends \Throwable
    Open source →
  7. 5.0.2 28 Sep 2020
    Release notes

    Changed

    • Changed PHP version constraint in composer.json from ^7.3 || ^8.0 to >=7.3
    Open source →
  8. 5.0.1 26 Jun 2020
    Release notes

    Added

    • This component is now supported on PHP 8
    Open source →
  9. 5.0.0 07 Jun 2020
    Release notes

    Changed

    • Parameter type for SebastianBergmann\Timer\Duration::fromMicroseconds() was changed from int to float
    • Parameter type for SebastianBergmann\Timer\Duration::fromNanoseconds() was changed from int to float
    • Return type for SebastianBergmann\Timer\Duration::asNanoseconds() was changed from int to float

    Fixed

    • #31: Type Error on 32-bit systems (where hrtime() returns float instead of int)
    Open source →
  10. 4.0.0 01 Jun 2020
    Release notes

    Added

    • Introduced Duration value object for encapsulating a duration with nanosecond granularity
    • Introduced ResourceUsageFormatter object for formatting resource usage with option to explicitly pass a duration (instead of looking at the unreliable $_SERVER['REQUEST_TIME_FLOAT'] variable)

    Changed

    • The methods of Timer are no longer static
    • Timer::stop() now returns a Duration value object

    Removed

    • Functionality that is now implemented in Duration and ResourceUsageFormatter has been removed from Timer
    Open source →
  11. 3.1.4 20 Apr 2020
    Release notes

    Changed

    • Timer::timeSinceStartOfRequest() no longer tries $_SERVER['REQUEST_TIME'] when $_SERVER['REQUEST_TIME_FLOAT'] is not available ($_SERVER['REQUEST_TIME_FLOAT'] was added in PHP 5.4 and this library requires PHP 7.3)
    • Improved exception messages when $_SERVER['REQUEST_TIME_FLOAT'] is not set or is not of type float

    Changed

    Open source →
  12. 3.1.3 20 Apr 2020
    Release notes

    Changed

    • Timer::timeSinceStartOfRequest() now raises an exception if $_SERVER['REQUEST_TIME_FLOAT'] does not contain a float (or $_SERVER['REQUEST_TIME'] does not contain an int)
    Open source →
  13. 3.1.2 17 Apr 2020
    Release notes

    Changed

    • Improved the fix for #30 and restored usage of hrtime()
    Open source →
  14. 3.1.1 17 Apr 2020
    Release notes

    Fixed

    • #30: Resolution of time returned by Timer::stop() is different than before (this reverts using hrtime() instead of microtime())
    Open source →
  15. 3.1.0 17 Apr 2020
    Release notes

    Added

    • Timer::secondsToShortTimeString() as alternative to Timer::secondsToTimeString()

    Changed

    • Timer::start() and Timer::stop() now use hrtime() (high resolution monotonic timer) instead of microtime()
    • Timer::timeSinceStartOfRequest() now uses Timer::secondsToShortTimeString() for time formatting
    • Improved formatting of Timer::secondsToTimeString() result
    Open source →
  16. 3.0.0 07 Feb 2020
    Release notes

    Removed

    • This component is no longer supported on PHP 7.1 and PHP 7.2
    Open source →
  17. 2.1.4 01 Mar 2024

    Nothing published for this version

  18. 2.1.3 30 Nov 2020

    Nothing published for this version

  19. 2.1.2 07 Jun 2019
    Release notes

    Fixed

    • #21: Formatting of memory consumption does not work on 32bit systems
    Open source →
  20. 2.1.1 20 Feb 2019
    Release notes

    Changed

    • Improved formatting of memory consumption for resourceUsage()
    Open source →
  21. 2.1.0 20 Feb 2019
    Release notes

    Changed

    • Improved formatting of memory consumption for resourceUsage()
    Open source →
  22. 2.0.0 01 Feb 2018
    Release notes

    Changed

    • This component now uses namespaces

    Removed

    • This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0
    Open source →
  23. 1.0.9 26 Feb 2017

    Nothing published for this version

  24. 1.0.8 12 May 2016

    Nothing published for this version

  25. 1.0.7 21 Jun 2015

    Nothing published for this version

  26. 1.0.6 13 Jun 2015

    Nothing published for this version

  27. 1.0.5 02 Aug 2013

    Nothing published for this version

  28. 1.0.4 11 Oct 2012

    Nothing published for this version

  29. 1.0.3 23 Sep 2012

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive