If you really don't need to store the version fields separately and just want to compare the two versions, then version_comparesometimes a good alternative is:
switch (version_compare("1.2.0.14", "1.2.0.22")) {
case -1:
case 0:
case +1:
}
( rc beta), version_compare , .14 , .2. 1.0-2
version_compare("2.0", "1.0", ">") .