# sebastianbergmann/php-token-stream

Wrapper around PHP's tokenizer extension.

Repository: https://github.com/sebastianbergmann/php-token-stream
Canonical: https://ross.abutalabs.com/products/php-token-stream
Language: PHP
License: NOASSERTION
License Family: other
Last push: 2021-07-26T12:15:45+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 6145, "days_push": 1864, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6374, forks 58 (observed 2026-08-28T04:09:42.902174+00:00)

## What it is
A PHP library that wraps PHP's tokenizer extension, providing an object-oriented interface for working with tokenized PHP source code. It was primarily used by PHPUnit's code coverage components.

## Use cases
- tokenize php source code
- analyze php code structure
- build php static analysis tools
- inspect php tokens programmatically
- support code coverage tooling

## When to choose
- you need an OO wrapper around PHP's tokenizer for legacy PHPUnit versions
- you are maintaining tooling that depends on phpunit/php-token-stream

## When to avoid
- starting a new project - it is deprecated in favor of nikic/php-parser
- you need a full AST rather than a token stream
- you need actively maintained parsing features

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, developer-tools
- domain: parsers, developer-tools, testing
- platform: php, cli
- tags: tokenizer, phpunit, static-analysis, code-analysis

## Member repositories
- sebastianbergmann/php-token-stream (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:42.902174+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:45:11.129149+00:00, confidence not recorded.
  - readme: https://github.com/sebastianbergmann/php-token-stream (fetched 2026-08-28T04:09:42.902174+00:00, sha e64a0c7baae0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
