# sebastianbergmann/phploc

A tool for quickly measuring the size of a PHP project.

Repository: https://github.com/sebastianbergmann/phploc
Canonical: https://ross.abutalabs.com/products/phploc
Language: PHP
License: BSD-3-Clause
License Family: permissive
Archived: true
Last push: 2025-04-12T05:04:58+00:00

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

## Adoption (not part of the score)
Stars 2343, forks 164 (observed 2026-08-28T04:06:39.234379+00:00)

## What it is
PHPLOC is a command-line tool that quickly measures the size of a PHP project, reporting lines of code, comment ratios, and cyclomatic complexity. It is distributed as a PHAR archive, but the project is no longer maintained and its repository is archived.

## Use cases
- measure lines of code in a php project
- count comment vs non-comment lines in a codebase
- get cyclomatic complexity statistics for php classes and functions
- estimate the size of a legacy php codebase
- generate quick codebase metrics for a report

## When to choose
- you need a fast, zero-config LOC and complexity snapshot of a PHP project
- you are okay using an unmaintained but stable tool

## When to avoid
- you need actively maintained tooling or support for the latest PHP syntax
- you need in-depth static analysis beyond size metrics
- you want CI-integrated quality gates with ongoing updates

## Facets
- artifact type: cli-tool
- maturity: abandoned
- function: developer-tools, cli, analytics
- domain: developer-tools
- platform: php, cli, cross-platform
- tags: code-metrics, lines-of-code, php, archived, cyclomatic-complexity, command-line, static-analysis

## Member repositories
- sebastianbergmann/phploc (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:39.234379+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-30T02:37:15.682056+00:00, confidence not recorded.
  - readme: https://github.com/sebastianbergmann/phploc (fetched 2026-08-28T04:06:39.234379+00:00, sha 4c8c2b6713d3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
