PHP Classes

PHP Version Check: Parse a string with a version number

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 92 All time: 9,918 This week: 78Up
Version License PHP version Categories
version 1.0.0The PHP License5PHP 5, Parsers
Description 

Author

This package can parse a string with a version number.

It can take a string with a version number and parses it to extract the version details.

The class can extract the version major, minor, and patch numbers and the next major, next minor, and following patch numbers.

It can also normalize version strings to reformat strings that may not comply with semver version specification.

Innovation Award
PHP Programming Innovation award nominee
June 2022
Number 8
Many software projects use a convention to number the project version numbers called semver.

This conversion splits the version numbers into three parts: major version, minor version, and patch number.

This possibility helps developers determine if the current version they are using is more recent or older than some other version.

This package parses version string numbers in a way that tolerates variations like putting a v in the front of the version, using needless zero characters before the version number parts, or even missing minor or patch numbers.

It can also normalize the version number strings to comply more with the semver convention.

Manuel Lemos
Picture of Roni
  Performance   Level  
Name: Roni is available for providing paid consulting. Contact Roni .
Classes: 12 packages by
Country: Bangladesh Bangladesh
Age: ???
All time rank: 278535 in Bangladesh Bangladesh
Week rank: 215 Up4 in Bangladesh Bangladesh Up
Innovation award
Innovation award
Nominee: 6x

Documentation

version

Simple Php DataType Class for version string


  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Plain text file Version.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:92
This week:0
All time:9,918
This week:78Up