# PHPCompatibility/PHPCompatibility

PHP Compatibility check for PHP_CodeSniffer

Repository: https://github.com/PHPCompatibility/PHPCompatibility
Canonical: https://ross.abutalabs.com/products/phpcompatibility
Homepage: http://techblog.wimgodden.be/tag/codesniffer/
Language: PHP
License: LGPL-3.0
License Family: copyleft
Topics: php, php-codesniffer, phpcs, php-versions, ruleset, phpcompatibility-standard, phpcompatibility, compatibility, compatibility-testing, custom-ruleset, composer, php-features
Last push: 2026-08-25T23:41:31+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 47, longevity 100
- inputs: {"age_days": 5296, "days_push": 8, "days_rel": 278, "gap_med": 38, "n_releases_24m": 2}
- flags: prerelease_only
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2301, forks 202 (observed 2026-08-28T04:06:35.502849+00:00)

## What it is
A set of sniffs (rules) for PHP_CodeSniffer that checks PHP code for cross-version compatibility. It analyses codebases for compatibility with higher and lower versions of PHP via configurable rulesets.

## Use cases
- check if my php code is compatible with php 8
- find deprecated php features before upgrading php version
- ensure codebase supports a range of php versions
- run php compatibility checks in ci
- detect syntax that will break on older php versions
- lint code for php version compatibility

## When to choose
- you already use PHP_CodeSniffer and want version compatibility checks
- you are upgrading or downgrading the PHP version a project supports
- you need CI-enforced compatibility rules across PHP 7.2 through nightly

## When to avoid
- you need general code style or security linting rather than version compatibility
- your project does not use PHP
- you want a standalone static analyzer without PHP_CodeSniffer

## Facets
- artifact type: library
- maturity: active
- function: linter, testing, developer-tools
- domain: developer-tools, programming-languages, testing
- platform: php, cli, cross-platform
- tags: phpcodesniffer, phpcs, coding-standard, ruleset, php-version-compatibility, static-analysis

## Member repositories
- PHPCompatibility/PHPCompatibility (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:35.502849+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:40:11.838791+00:00, confidence not recorded.
  - readme: https://github.com/PHPCompatibility/PHPCompatibility (fetched 2026-08-28T04:06:35.502849+00:00, sha 33c0088c001e)
  - homepage: http://techblog.wimgodden.be/tag/codesniffer/ (fetched 2026-08-29T10:20:26.075539+00:00, sha 81ec2e387c66)
  - site_page: https://techblog.wimgodden.be/about-me (fetched 2026-08-29T10:20:26.078554+00:00, sha 9f39c5a62e4d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
