PHPackages                             ktamas77/phptimer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. ktamas77/phptimer

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

ktamas77/phptimer
=================

Native PHP Library to profile PHP code.

2.0.0(5y ago)730.0k2MITPHPPHP &gt;=7.3.0CI failing

Since May 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ktamas77/phptimer)[ Packagist](https://packagist.org/packages/ktamas77/phptimer)[ RSS](/packages/ktamas77-phptimer/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

PHPTimer
========

[](#phptimer)

> Note: v2.0.0 requires PHP 7.3 and using its own namespace.
>
> For PHP 5 projects please use v1.0.0

An easy to use 100% native PHP library to profile PHP code.

You can start/stop timers at any point in the code.

#### v2.0.0 use for PHP 7.3+:

[](#v200-use-for-php-73)

Installation:

```
composer require ktamas77/phptimer
```

Use in code:

```
use ktamas77\phptimer\Timer;
```

#### v1.0.0 (legacy) use for PHP 5:

[](#v100-legacy-use-for-php-5)

Installation:

```
composer require ktamas77/phptimer:1.0.0
```

Use in code:

```
start('cycle');
    for ($i = 0; $i < 100000; $i++) {
    $a *= $i;
}
$timer->stop('cycle');

for ($i = 0; $i < 10; $i++) {
    $timer->start("subloop");
    for ($j = 0; $j < 1000000; $j++) {
        $a = $i * $j;
    }
    $timer->stop("subloop");
}

var_dump($timer->getAll());
```

Result:

```
php timer_example.php

array(3) {
  ["cycle"]=>
  array(8) {
    ["start"]=>
    float(1464109111.9151)
    ["stop"]=>
    float(1464109111.9188)
    ["starts"]=>
    int(1)
    ["range"]=>
    float(0.0037481784820557)
    ["status"]=>
    string(7) "stopped"
    ["average"]=>
    float(0.0037481784820557)
    ["average_human"]=>
    string(4) "0.00"
    ["range_human"]=>
    string(4) "0.00"
  }
  ["date"]=>
  array(8) {
    ["start"]=>
    float(1464109111.9189)
    ["stop"]=>
    float(1464109112.2928)
    ["starts"]=>
    int(1)
    ["range"]=>
    float(0.37390089035034)
    ["status"]=>
    string(7) "stopped"
    ["average"]=>
    float(0.37390089035034)
    ["average_human"]=>
    string(4) "0.37"
    ["range_human"]=>
    string(4) "0.37"
  }
  ["subloop"]=>
  array(8) {
    ["start"]=>
    float(1464109112.5907)
    ["stop"]=>
    float(1464109112.6227)
    ["starts"]=>
    int(10)
    ["range"]=>
    float(0.32978487014771)
    ["status"]=>
    string(7) "stopped"
    ["average"]=>
    float(0.032978487014771)
    ["average_human"]=>
    string(4) "0.03"
    ["range_human"]=>
    string(4) "0.33"
  }
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1656 days

Total

2

Last Release

2032d ago

Major Versions

1.0.0 → 2.0.02020-12-05

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1231708?v=4)[Tamas Kalman](/maintainers/ktamas77)[@ktamas77](https://github.com/ktamas77)

---

Top Contributors

[![ktamas77](https://avatars.githubusercontent.com/u/1231708?v=4)](https://github.com/ktamas77 "ktamas77 (15 commits)")

---

Tags

profilertimer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ktamas77-phptimer/health.svg)

```
[![Health](https://phpackages.com/badges/ktamas77-phptimer/health.svg)](https://phpackages.com/packages/ktamas77-phptimer)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k130.0M722](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k1.7M56](/packages/fruitcake-laravel-debugbar)[php-debugbar/php-debugbar

Debug bar in the browser for php application

4.4k26.7M61](/packages/php-debugbar-php-debugbar)[tracy/tracy

😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.

1.8k25.1M1.4k](/packages/tracy-tracy)[fruitcake/laravel-telescope-toolbar

Toolbar for Laravel Telescope based on Symfony Web Profiler

8041.7M5](/packages/fruitcake-laravel-telescope-toolbar)[vpietri/adm-quickdevbar

QuickDevBar is a developer toolbar for magento 2

577356.6k](/packages/vpietri-adm-quickdevbar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
