diff --git a/reference/info/functions/version-compare.xml b/reference/info/functions/version-compare.xml index ad49b5b4c2..ea1c8dd8f5 100644 --- a/reference/info/functions/version-compare.xml +++ b/reference/info/functions/version-compare.xml @@ -16,15 +16,13 @@ version_compare compares two "PHP-standardized" - version number strings. This is useful if you would like to write programs - working only on some versions of PHP. + version number strings. The function first replaces _, - and + with a dot . in the version strings and also inserts dots . before and after any non number so that for example '4.3.2RC1' becomes '4.3.2.RC.1'. Then it - splits the results like if you were using explode('.', $ver). Then it compares the parts starting from left to right. If a part contains special version strings these are handled in the following order: any string not found in this list < @@ -62,19 +60,17 @@ operator - If you specify the third optional operator - argument, you can test for a particular relationship. The - possible operators are: <, - lt, <=, - le, >, - gt, >=, - ge, ==, - =, eq, - !=, <>, - ne respectively. + If the third optional operator argument is + specified, test for a particular relationship. The possible operators + are: <, lt, + <=, le, >, + gt, >=, ge, + ==, =, eq, + !=, <>, ne + respectively. - This parameter is case-sensitive, so values should be lowercase. + This parameter is case-sensitive, values should be lowercase.