PHP.nl

rpmvercmp

rpmvercmp

RPM version comparison

 **rpmvercmp** string $evr1 string $evr2  $operator

Compare two RPM package versions.

evr1 First string. epoch:version-release

evr2 Second string. epoch:version-release

operator An optional operator. The possible operators are: . <``lt``<=``le``>``gt``>=``ge``==``=``eq``!=``<>``ne

This parameter is case-sensitive, values should be lowercase.

Returns if is less than , if is greater than , and if they are equal. -1``evr1``evr2``1``evr1``evr2``0

When using the optional argument, the function will return true if the relationship is the one specified by the operator, false otherwise. operator