# phar-io/version

Library for handling version information and constraints

Repository: https://github.com/phar-io/version
Canonical: https://ross.abutalabs.com/products/version
Homepage: https://phar.io/
Language: PHP
License: BSD-3-Clause
License Family: permissive
Last push: 2026-05-20T15:32:59+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 83, release rhythm 8, longevity 100
- inputs: {"age_days": 3563, "days_push": 105, "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 7463, forks 18 (observed 2026-08-28T04:10:00.044553+00:00)

## What it is
A PHP library for parsing, comparing, and checking semantic version numbers and version constraints such as caret and tilde ranges. It supports pre-release labels and is used by tools like PHIVE for version handling.

## Use cases
- parse semver version strings in php
- check if a version satisfies a constraint like ^7.0
- compare versions including pre-release labels
- implement dependency version resolution
- validate version numbers in a php application

## When to choose
- you need semver parsing and constraint matching in PHP
- you are building a package or tool manager that resolves version ranges
- you need caret/tilde operator semantics matching Composer conventions

## When to avoid
- you need full Composer dependency resolution, not just version comparison
- your project is not in PHP
- you need changelog generation or release automation rather than version parsing

## Facets
- artifact type: library
- maturity: stable
- function: parser, serialization
- domain: developer-tools, version-control, programming-languages
- platform: php
- tags: semantic-versioning, version-constraints, composer, php-library

## Member repositories
- phar-io/version (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:00.044553+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:37:38.406131+00:00, confidence not recorded.
  - readme: https://github.com/phar-io/version (fetched 2026-08-28T04:10:00.044553+00:00, sha 9567e0e67d30)
  - homepage: https://phar.io/ (fetched 2026-08-29T08:32:55.923377+00:00, sha c119890c8bc9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
