PHPackages                             rmtram/version-sort - 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. [API Development](/categories/api)
4. /
5. rmtram/version-sort

ActiveLibrary[API Development](/categories/api)

rmtram/version-sort
===================

Version sort

v1.0.0(10y ago)012MITPHP

Since Feb 8Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Rmtram/VersionSort)[ Packagist](https://packagist.org/packages/rmtram/version-sort)[ Docs](https://github.com/Rmtram/VersionSort)[ RSS](/packages/rmtram-version-sort/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

VersionSort
===========

[](#versionsort)

[![Build Status](https://camo.githubusercontent.com/456027e6719dbd3aa10cf84d1fc049d516c3d43b4d1dc3ba1c74114e3209018f/68747470733a2f2f7472617669732d63692e6f72672f526d7472616d2f56657273696f6e536f72742e737667)](https://travis-ci.org/Rmtram/VersionSort)[![Total Downloads](https://camo.githubusercontent.com/b4a27891aa13140667c29fa4f0f679ad1b2ff844f06a3e5d088a6273ddde91c9/68747470733a2f2f706f7365722e707567782e6f72672f726d7472616d2f76657273696f6e2d736f72742f646f776e6c6f616473)](https://packagist.org/packages/rmtram/version-sort)[![Latest Stable Version](https://camo.githubusercontent.com/5df407ee96b4a39819017fb8e490ba157390d8ce2625a6d4fbb8862a94f93618/68747470733a2f2f706f7365722e707567782e6f72672f726d7472616d2f76657273696f6e2d736f72742f762f737461626c652e706e67)](https://packagist.org/packages/rmtram/version-sort)

Introduction
------------

[](#introduction)

Library to sort a very simple version.

Install
-------

[](#install)

**Composer**

```
$ composer require rmtram/version-sort

```

**Basic**

[Source Download](https://github.com/Rmtram/VersionSort/archive/v1.0.0.zip)

Copy File =&gt; `src/VersionSort.php`

```
require '/path/to/VersionSort.php';

```

Example
-------

[](#example)

```
$versions = array('v1.0.1', '1.30.3', 'version1.0.99', '1.0.4');
$vs = new Rmtram\VersionSort\VersionSort($versions);

// trimming v1.0.1 => 1.0.1 | version1.0.99 => 1.0.99
$vs->trim();

var_dump($vs->asc());
// result => ['1.0.1', '1.0.4', '1.0.99', '1.30.3']

var_dump($vs->desc());
// result => ['1.30.3', '1.0.99', '1.0.4', '1.0.1']
```

Support Version.
----------------

[](#support-version)

- PHP 5.3
- PHP 5.4
- PHP 5.5
- PHP 5.6
- PHP 7.0
- HHVM

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3796d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d7cbad47788700bb6b0fe45e8431c751d6be5d4cb7806895140c9e38f3bd7b3?d=identicon)[Rmtram](/maintainers/Rmtram)

---

Top Contributors

[![NoguHiro](https://avatars.githubusercontent.com/u/4655005?v=4)](https://github.com/NoguHiro "NoguHiro (5 commits)")

---

Tags

apisortversionversion-sortapi-version-sort

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rmtram-version-sort/health.svg)

```
[![Health](https://phpackages.com/badges/rmtram-version-sort/health.svg)](https://phpackages.com/packages/rmtram-version-sort)
```

###  Alternatives

[reindert-vetter/api-version-control

A Laravel package to manage versions of endpoints in an elegant way

1671.0M](/packages/reindert-vetter-api-version-control)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22879.8k](/packages/m165437-laravel-blueprint-docs)[joskolenberg/laravel-jory

Create a flexible API for your Laravel application using json based queries.

4513.9k](/packages/joskolenberg-laravel-jory)

PHPackages © 2026

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