# adsr/phpspy

low-overhead sampling profiler for PHP 7+

Repository: https://github.com/adsr/phpspy
Canonical: https://ross.abutalabs.com/products/phpspy
Language: C
License: MIT
License Family: permissive
Topics: profiler, performance, php, hacktoberfest
Last push: 2026-05-21T06:14:39+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 83, release rhythm 8, longevity 100
- inputs: {"age_days": 3070, "days_push": 104, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1500, forks 70 (observed 2026-08-28T04:04:54.235211+00:00)

## What it is
phpspy is a low-overhead sampling profiler for PHP 7+ written in C. It can attach to running PHP processes (CLI, Apache, FPM) without code changes and generate stack traces for flamegraphs.

## Use cases
- profile a slow PHP script
- attach a profiler to a running PHP-FPM process
- generate flamegraphs for PHP applications
- find performance bottlenecks in production PHP without code changes
- monitor PHP memory usage and request info while profiling
- top-like live view of PHP process stacks

## When to choose
- you need low-overhead production profiling of PHP on x86_64 Linux
- you want to attach to already-running PHP processes without restarting or instrumenting them
- you need flamegraph-compatible stack traces

## When to avoid
- you are not on Linux x86_64 (aarch64 support is experimental)
- you use ZTS PHP builds
- you need a GUI-based profiler or Windows/macOS support

## Facets
- artifact type: cli-tool
- maturity: active
- function: monitoring, benchmarking, developer-tools
- domain: performance, developer-tools
- platform: cli, cpp
- tags: php, sampling-profiler, flamegraphs, process-attachment, low-overhead, command-line, linux

## Member repositories
- adsr/phpspy (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:54.235211+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-30T04:32:59.257264+00:00, confidence not recorded.
  - readme: https://github.com/adsr/phpspy (fetched 2026-08-28T04:04:54.235211+00:00, sha c31a11733542)
- Data as of 2026-08-30T08:39:29.467469+00:00.
