How to check if a version number is greater or lower than another version number. Is their any tiny library for this?
Example:
'1.1.2' > '1.1.10' // should return false
'1.1.10' > '1.1.9' // should return true
You can use PHP function version_compare
(link).
Then you can check what value returned (part of official documentation):
By default, version_compare() returns -1 if the first version is lower than the second, 0 if they are equal, and 1 if the second is lower.