PHPackages                             naneau/semver - 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. naneau/semver

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

naneau/semver
=============

A decent, standards-compliant, Semantic Versioning (SemVer) parser and library

0.0.7(13y ago)72496.2k↓13.7%9[5 issues](https://github.com/naneau/semver/issues)[2 PRs](https://github.com/naneau/semver/pulls)12MITPHPPHP &gt;=5.3.0

Since Jan 4Pushed 10y ago2 watchersCompare

[ Source](https://github.com/naneau/semver)[ Packagist](https://packagist.org/packages/naneau/semver)[ Docs](https://github.com/naneau/semver)[ RSS](/packages/naneau-semver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (12)

A decent SemVer library
=======================

[](#a-decent-semver-library)

[![Build Status](https://camo.githubusercontent.com/cc2c8a6626a725af9cc53fa3d3722f326268f94e607aa47bfd3f8c799e714d5d/68747470733a2f2f7472617669732d63692e6f72672f6e616e6561752f73656d7665722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/naneau/semver)[![SensioLabsInsight](https://camo.githubusercontent.com/b58970accef789ba7c1f0be01d13d8f24350c3e399e17b7a06dae72abcf47c49/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f66613364393938322d663166392d343633372d383466322d6333616334363036373663372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/fa3d9982-f1f9-4637-84f2-c3ac460676c7)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/979c0de0c9f5f57db585366a701a142a0153e495573dcb711bca0d4145bca596/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e616e6561752f73656d7665722f6261646765732f7175616c6974792d73636f72652e706e673f733d30643966313834616235343536656162336339323232666432663533653164656664343364313137)](https://scrutinizer-ci.com/g/naneau/semver/)[![Code Coverage](https://camo.githubusercontent.com/8f1fcdd4e3002136a3f525687f29c5969b4493c514fdf3d253bdbdefdf1967e5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e616e6561752f73656d7665722f6261646765732f636f7665726167652e706e673f733d64323932663231666665313938323732646663306439366637383735303730343634346436343733)](https://scrutinizer-ci.com/g/naneau/semver/)

This library is a [SemVer](http://semver.org) parser written in PHP. It has a solid, fully tested OO API that makes it easy to work with SemVer versions.

This library was born out of a lack of decent tools to read and manipulate SemVer versions in PHP. The libraries currently out there are either not fully standards compatible, and/or lack a decent API.

Usage (PHP)
-----------

[](#usage-php)

### Parsing and Properties

[](#parsing-and-properties)

Parsing strings into SemVer Versions is easy:

```
