# sebastianbergmann/code-unit-reverse-lookup

Looks up which function or method a line of code belongs to

Repository: https://github.com/sebastianbergmann/code-unit-reverse-lookup
Canonical: https://ross.abutalabs.com/products/code-unit-reverse-lookup
Language: PHP
License: BSD-3-Clause
License Family: permissive
Last push: 2025-05-25T06:37:51+00:00

## Health v2 (maintenance only)
Score: 33/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 23, release rhythm 8, longevity 100
- inputs: {"age_days": 3859, "days_push": 465, "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 6679, forks 7 (observed 2026-08-28T04:09:47.600095+00:00)

## What it is
A small PHP library that maps a line of code to the function or method it belongs to. It is primarily used as a dependency of PHPUnit and is now a low-maintenance project.

## Use cases
- find which function a line of php code belongs to
- map stack trace line numbers to methods
- resolve code location for error reporting in php
- determine enclosing method for a given file line
- support test failure reporting in phpunit

## When to choose
- you need line-to-function mapping in a PHP project
- you are building PHP tooling that reports code locations
- you need it as a PHPUnit dependency

## When to avoid
- you need active development or new features
- you work outside the PHP ecosystem
- you need full static analysis rather than simple line lookup

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, developer-tools
- domain: developer-tools, testing, parsers
- platform: php, cli
- tags: php-library, code-introspection, phpunit-dependency, composer-package

## Member repositories
- sebastianbergmann/code-unit-reverse-lookup (main) score 33

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:47.600095+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-29T17:43:00.660343+00:00, confidence not recorded.
  - readme: https://github.com/sebastianbergmann/code-unit-reverse-lookup (fetched 2026-08-28T04:09:47.600095+00:00, sha 276f83266214)
- Data as of 2026-08-30T08:39:29.467469+00:00.
