# phpbench/phpbench

PHP Benchmarking framework

Repository: https://github.com/phpbench/phpbench
Canonical: https://ross.abutalabs.com/products/phpbench
Language: PHP
License: MIT
License Family: permissive
Topics: benchmark-framework, benchmarking, performance, performance-testing
Last push: 2026-06-14T18:28:30+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 87, release rhythm 87, longevity 100
- inputs: {"age_days": 4140, "days_push": 80, "days_rel": 86, "gap_med": 30.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2018, forks 133 (observed 2026-08-28T04:06:06.162136+00:00)

## What it is
PHPBench is a benchmarking framework for PHP, analogous to PHPUnit but for measuring performance rather than correctness. It runs code repeatedly with process isolation, collects statistical data, and supports reports, storage, comparison, and performance assertions.

## Use cases
- benchmark php code execution time
- detect performance regressions in php
- measure memory usage of php functions
- compare benchmark results against a baseline
- generate performance reports in console or html

## When to choose
- you need statistically rigorous micro-benchmarks for PHP code
- you want to assert and track performance over time like regression tests
- you need customizable reporting and stored benchmark history

## When to avoid
- you need load or stress testing of HTTP services rather than code-level benchmarks
- you are profiling a single run rather than benchmarking averaged execution
- your project is not written in PHP

## Facets
- artifact type: framework
- maturity: active
- function: benchmarking, testing, cli
- domain: performance, developer-tools, testing
- platform: php, cli
- tags: php, benchmark-runner, performance-regression, micro-benchmarking

## Member repositories
- phpbench/phpbench (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:06.162136+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:00:28.718931+00:00, confidence not recorded.
  - readme: https://github.com/phpbench/phpbench (fetched 2026-08-28T04:06:06.162136+00:00, sha 5b0e73abf1ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
