static bool compare(string $version1, string $version2, string $operator, int|null $precision = null)
Compares two ICU versions with an operator.
This method is identical to {@link version_compare()}, except that you can pass the number of regarded version components in the last argument $precision.
Also, a single digit release version and a single digit major version are contracted to a two digit release version. If no major version is given, it is substituted by zero.
Examples:
IcuVersion::compare('1.2.3', '1.2.4', '==')
// => false
IcuVersion::compare('1.2.3', '1.2.4', '==', 2)
// => true
IcuVersion::compare('1.2.3', '12.3', '==')
// => true
IcuVersion::compare('1', '10', '==')
// => true
Please login to continue.