Function compareVersions
Compares two versions and determines if one is newer, older or the same, returns - (-1) if version1 is lower than version2 - (0) if version1 is equal to version2 - (1) if version1 is higher than version2
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Package.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Package.php
string |
$version1 |
The first version |
string |
$version2 |
The second version |
integer
|
-1 if version2 is greater than version1, 0 if they're equal, 1 if version1 is greater than version2 |