# sebastianbergmann/phpcpd

Copy/Paste Detector (CPD) for PHP code.

Repository: https://github.com/sebastianbergmann/phpcpd
Canonical: https://ross.abutalabs.com/products/phpcpd
Language: PHP
License: BSD-3-Clause
License Family: permissive
Archived: true
Last push: 2023-01-10T12:50:42+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 6430, "days_push": 1331, "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 2209, forks 189 (observed 2026-08-28T04:06:26.333096+00:00)

## What it is
PHPCPD is a Copy/Paste Detector command-line tool for PHP code that identifies duplicated lines and clone classes across a codebase. It is distributed as a PHAR and is now archived and no longer maintained.

## Use cases
- find duplicated code in a php project
- detect copy-pasted functions across files
- measure code duplication percentage in ci
- refactor repeated code blocks in php
- audit legacy php codebase for clones

## When to choose
- you need a simple, fast duplication detector for PHP
- you want a standalone PHAR with no Composer dependency
- you are okay using an unmaintained but stable tool

## When to avoid
- you need actively maintained tooling or support for modern PHP versions
- you need multi-language duplication detection
- you want integration with newer static analysis pipelines

## Facets
- artifact type: cli-tool
- maturity: abandoned
- function: developer-tools, code-review, linter
- domain: developer-tools, testing
- platform: cli, php, cross-platform
- tags: code-duplication, copy-paste-detection, static-analysis, php, command-line

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

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:26.333096+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:46:19.640684+00:00, confidence not recorded.
  - readme: https://github.com/sebastianbergmann/phpcpd (fetched 2026-08-28T04:06:26.333096+00:00, sha 388b007b42ef)
- Data as of 2026-08-30T08:39:29.467469+00:00.
