PHPackages                             dantleech/phpbench - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. dantleech/phpbench

Abandoned → [phpbench/phpbench](/?search=phpbench%2Fphpbench)Library[Testing &amp; Quality](/categories/testing)

dantleech/phpbench
==================

PHP Benchmarking Framework

1.6.1(1mo ago)2.0k325132[29 issues](https://github.com/phpbench/phpbench/issues)[9 PRs](https://github.com/phpbench/phpbench/pulls)MITPHPPHP ^8.2CI passing

Since May 25Pushed 1mo ago29 watchersCompare

[ Source](https://github.com/phpbench/phpbench)[ Packagist](https://packagist.org/packages/dantleech/phpbench)[ GitHub Sponsors](https://github.com/dantleech)[ RSS](/packages/dantleech-phpbench/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (45)Versions (137)Used By (0)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

 [![](https://user-images.githubusercontent.com/530801/92305960-d2866a00-ef83-11ea-878a-10584e583da4.png "PHPBench logo")](https://user-images.githubusercontent.com/530801/92305960-d2866a00-ef83-11ea-878a-10584e583da4.png)

[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)[![CI](https://github.com/phpbench/phpbench/actions/workflows/ci.yaml/badge.svg)](https://github.com/phpbench/phpbench/actions/workflows/ci.yaml)[![Documentation](https://github.com/phpbench/phpbench/actions/workflows/documentation.yaml/badge.svg)](https://github.com/phpbench/phpbench/actions/workflows/documentation.yaml)[![Latest Stable Version](https://camo.githubusercontent.com/42c0e884df97b14956a8ea1d95f50e692d671d7dfd8cde61cbe1e1c45bec0778/68747470733a2f2f706f7365722e707567782e6f72672f70687062656e63682f70687062656e63682f76)](//packagist.org/packages/phpbench/phpbench)[![Total Downloads](https://camo.githubusercontent.com/49575544a7e678a448c1b40c2ab92c7a9eba9bbfd86ef5f811630a8ff52fad55/68747470733a2f2f706f7365722e707567782e6f72672f70687062656e63682f70687062656e63682f646f776e6c6f616473)](//packagist.org/packages/phpbench/phpbench)[![License](https://camo.githubusercontent.com/9632adc34195bdab94c396f5c27f322682dcdbf5ccd3eda7e985076746478d5d/68747470733a2f2f706f7365722e707567782e6f72672f70687062656e63682f70687062656e63682f6c6963656e7365)](//packagist.org/packages/phpbench/phpbench)

PHPBench is a benchmark runner for PHP analogous to [PHPUnit](https://github.com/phpunit/phpunit) but for performance rather than correctness.

Features include:

- [Revolutions](https://phpbench.readthedocs.io/en/latest/annotributes.html#revolutions): Repeat your code many times to determine average execution *time*.
- [Iterations](https://phpbench.readthedocs.io/en/latest/annotributes.html#iterations): Sample your revolutions many times and review aggregated statistical data.
- **Process Isolation**: Each iteration is executed in a separate process.
- [Reporting](https://phpbench.readthedocs.io/en/latest/guides/reports.html): Customizable reports and various output formats (e.g. console, CSV, Markdown, HTML).
- Report [storage](https://phpbench.readthedocs.io/en/latest/guides/storage.html) and [comparison](https://phpbench.readthedocs.io/en/latest/guides/regression-testing.html): Store benchmarks locally to be used as a baseline reference, or to reference them later.
- **Memory Usage**: Keep an eye on the amount of memory used by benchmarking subjects.
- [Assertions](https://phpbench.readthedocs.io/en/latest/annotributes.html#assertions): Assert that code is performing within acceptable limits, or that it has not regressed from a previously recorded baseline.

See the [documentation](https://phpbench.readthedocs.io/en/latest/index.html)to find out more.

Installation
------------

[](#installation)

```
composer require phpbench/phpbench --dev
```

See the [installation instructions](http://phpbench.readthedocs.io/en/latest/installing.html) for more options.

Documentation
-------------

[](#documentation)

Documentation is hosted on [readthedocs](http://phpbench.readthedocs.io).

Community
---------

[](#community)

- Follow [@phpbench](https://phpc.social/@phpbench) on Mastodon for the latest news.
- Join the `#phpbench` channel on the Slack [Symfony Devs](https://symfony-devs.slack.com/join/shared_invite/enQtMzM3NDA1NzEyMzg0LTgyNGYwYjFjMjY5YjllYWZkYTY2OWM4MDQzZTgzMmNjNGI3ZDJhYzE2Yjc4NmFmM2JiOTZjODg2MGJlM2RjMDU)channel.

Screenshots
-----------

[](#screenshots)

Running benchmarks and comparing against a baseline:

[![phpbench](https://user-images.githubusercontent.com/530801/117569074-b52e1080-b0bb-11eb-8c80-a89ce9cce1e2.png)](https://user-images.githubusercontent.com/530801/117569074-b52e1080-b0bb-11eb-8c80-a89ce9cce1e2.png)

Aggregated report:

[![image](https://user-images.githubusercontent.com/530801/117569081-c8d97700-b0bb-11eb-91e5-fc9eaa1ac157.png)](https://user-images.githubusercontent.com/530801/117569081-c8d97700-b0bb-11eb-91e5-fc9eaa1ac157.png)

Blinken logger:

[![phpbench-blinken](https://user-images.githubusercontent.com/530801/92305786-4a539500-ef82-11ea-8a2c-db67968113b5.png)](https://user-images.githubusercontent.com/530801/92305786-4a539500-ef82-11ea-8a2c-db67968113b5.png)

HTML Bar Chart:

[![Untitled](https://user-images.githubusercontent.com/530801/129060591-1dd984f1-8d03-4cf5-9601-7e677029e647.png)](https://user-images.githubusercontent.com/530801/129060591-1dd984f1-8d03-4cf5-9601-7e677029e647.png)

Console Bar Chart:

[![Untitled](https://user-images.githubusercontent.com/530801/129060527-9cf6c0e0-15f8-4f38-a8e1-39b257ff62fd.png)](https://user-images.githubusercontent.com/530801/129060527-9cf6c0e0-15f8-4f38-a8e1-39b257ff62fd.png)

Contributing
------------

[](#contributing)

PHPBench is an open source project. If you find a problem or want to discuss new features or improvements please create an issue, and/or if possible create a pull request.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity40

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 89.5% 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 ~45 days

Recently: every ~4 days

Total

88

Last Release

57d ago

Major Versions

0.17.1 → 1.0.0-alpha12020-09-09

1.3.1 → 84.x-dev2024-10-12

PHP version history (15 changes)0.1PHP ~5.3

0.2PHP ~5.4

0.5PHP ^5.4

0.6PHP ^5.4|^7.0

0.11.0PHP ^5.5|^7.0

0.13.0PHP ^5.6|^7.0

0.14.0PHP ^7.0

0.15.0PHP ^7.1

0.17.0PHP ^7.2

1.0.0-alpha2PHP ^7.2|^8.0

1.0.0-alpha3PHP ^7.2 || ^8.0

1.1.2PHP ^7.3 || ^8.0

1.2.9PHP ^7.4 || ^8.0

1.2.15PHP ^8.1

1.5.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (1298 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (39 commits)")[![aivchen](https://avatars.githubusercontent.com/u/4580308?v=4)](https://github.com/aivchen "aivchen (27 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (6 commits)")[![marc-mabe](https://avatars.githubusercontent.com/u/302689?v=4)](https://github.com/marc-mabe "marc-mabe (5 commits)")[![igortyulkin](https://avatars.githubusercontent.com/u/34263157?v=4)](https://github.com/igortyulkin "igortyulkin (3 commits)")[![Jeckerson](https://avatars.githubusercontent.com/u/3289702?v=4)](https://github.com/Jeckerson "Jeckerson (2 commits)")[![agustingomes](https://avatars.githubusercontent.com/u/15325886?v=4)](https://github.com/agustingomes "agustingomes (2 commits)")[![llaville](https://avatars.githubusercontent.com/u/364342?v=4)](https://github.com/llaville "llaville (2 commits)")[![Kocal](https://avatars.githubusercontent.com/u/2103975?v=4)](https://github.com/Kocal "Kocal (2 commits)")[![antonio-gg-dev](https://avatars.githubusercontent.com/u/13595197?v=4)](https://github.com/antonio-gg-dev "antonio-gg-dev (2 commits)")[![AydinHassan](https://avatars.githubusercontent.com/u/2817002?v=4)](https://github.com/AydinHassan "AydinHassan (2 commits)")[![dbalabka](https://avatars.githubusercontent.com/u/1269372?v=4)](https://github.com/dbalabka "dbalabka (2 commits)")[![dkarlovi](https://avatars.githubusercontent.com/u/209225?v=4)](https://github.com/dkarlovi "dkarlovi (2 commits)")[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (2 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (2 commits)")[![jbboehr](https://avatars.githubusercontent.com/u/225601?v=4)](https://github.com/jbboehr "jbboehr (2 commits)")[![norival](https://avatars.githubusercontent.com/u/11806113?v=4)](https://github.com/norival "norival (2 commits)")

---

Tags

benchmark-frameworkbenchmarkingperformanceperformance-testingtestingperformanceprofilingbenchmarkingoptimization

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dantleech-phpbench/health.svg)

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

###  Alternatives

[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)

PHPackages © 2026

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