PHPackages                             corneltek/versionkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. corneltek/versionkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

corneltek/versionkit
====================

Versioning library

7251PHP

Since Dec 12Pushed 10y ago1 watchersCompare

[ Source](https://github.com/c9s/VersionKit)[ Packagist](https://packagist.org/packages/corneltek/versionkit)[ RSS](/packages/corneltek-versionkit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

VersionKit
==========

[](#versionkit)

[![Build Status](https://camo.githubusercontent.com/f5e0d729a1d792675b3ddc6667a8e8f037bc0278f8da0e82303e3acf6c53acfc/68747470733a2f2f7472617669732d63692e6f72672f6339732f56657273696f6e4b69742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/c9s/VersionKit)

Utility functions for manipulating version strings.

```
$versionStrs = [
    'php-5.3.1',
    'php-5.3.22',
    'php-5.4',
    'php-5',
    'hhvm-3.2',
    'php-5.3.0-dev',
    'php-5.3.0-alpha3',
    'php-5.3.0-beta2',
    'php-5.3.0-RC5',
    '5.3.0-dev',
    '5.3.0-alpha3',
    '5.3.0-beta2',
    '5.3.0-RC5',
    '5.3.3',
    '5.3.0',
    '5.3',
    '5',
];
foreach ($versionStrs as $versionStr) {
    $version = new Version($versionStr);
    $version->major;
    $version->minor;
    $version->patch;
    $version->getVersionNumber(); // 5.3.2
    $version->getCanonicalizedVersionName(); // php-5.3.0-dev
    $version->compare(new Version('php-5.3.2'));
}
```

### VersionCollection

[](#versioncollection)

```
$versions = new VersionCollection(['php-5.4.0', 'php-5.5.0', 'php-7.0.0', 'php-5.3.0', 'php-5.3.3']);

$this->assertTrue( $versions->sortAscending() );
$this->assertEquals('["php-5.3.0","php-5.3.3","php-5.4.0","php-5.5.0","php-7.0.0"]', $versions->toJson());

$this->assertTrue( $versions->sortDescending() );
$this->assertEquals('["php-7.0.0","php-5.5.0","php-5.4.0","php-5.3.3","php-5.3.0"]', $versions->toJson());

$versions = new VersionCollection(['php-5.3.0', 'php-5.3.3', 'php-5.4.0', 'php-5.5.0', 'php-7.0.0']);
$versions7 = $versions->filterByMajorVersion(7);
$versions5 = $versions->filterByMajorVersion(5);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cc34cde233b660869ff329ed8e20df611f75dfb61aab3e30889ac153d3e5e61?d=identicon)[c9s](/maintainers/c9s)

---

Top Contributors

[![c9s](https://avatars.githubusercontent.com/u/50894?v=4)](https://github.com/c9s "c9s (30 commits)")

### Embed Badge

![Health badge](/badges/corneltek-versionkit/health.svg)

```
[![Health](https://phpackages.com/badges/corneltek-versionkit/health.svg)](https://phpackages.com/packages/corneltek-versionkit)
```

###  Alternatives

[delight-im/base64

Simple and convenient Base64 encoding and decoding for PHP

15158.1k6](/packages/delight-im-base64)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
