PHP and Joomla! version numbers are not decimals. They are three numbers separated by dots. This leads to some confusion because, for example, PHP 5.3.28 is newer than 5.3.4 whereas the decimal number 5.328 is smaller than the decimal number 5.34. Do not read versions as if they were decimals.
In short, version numbers follow the sequence 5.3.0, 5.3.1, 5.3.2, ..., 5.3.9, 5.3.10, 5.3.11, ..., 5.3.19, 5.3.20, 5.3.21 and so on. As a result version 5.3.28 is twenty four versions newer than 5.3.4. Similarly, version 5.3.4 is thirty six versions older than 5.3.40. Unlike decimals, trailing zeros do matter in version numbers.
Version numbers usually consist of three numbers separated by dots. For example: 1.2.3 These numbers have names. The leftmost number (1) is called the major version. The middle number (2) is called the minor version. The rightmost number (3) is called the revision but it may also be referred to as a "point release" or "subminor version".
When you want to know if a version is newer than a different version you have to start reading from left to right:
Let's check version 5.3.22 against version 5.3.4. The major version 5 is the same, we continue. The minor version 3 is the same, we continue. The revision is 22 which is higher than 4, therefore 5.3.22 is newer than 5.3.4.
Let's check version 5.4.2 against version 5.3.4. The major version 5 is the same, we continue. The minor version 4 is higher than minor version 3, therefore 5.4.2 is newer than 5.3.4.
Let's check version 6.0.0 against version 5.3.4. The major version 6 is higher than major version 5, therefore 6.0.0 is newer than 5.3.4.
Let's check version 5.2.6 against version 5.3.4. The major version 5 is the same, we continue. The minor version is 2 which is lower than 3, therefore 5.2.6 is older than 5.3.4.