From 7912f8465bbd1cf47d0706ce1d881ca6a50a3665 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 1 Jun 2003 15:10:09 +0000 Subject: [PATCH] Add the rules git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129732 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/info/functions/version-compare.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/reference/info/functions/version-compare.xml b/reference/info/functions/version-compare.xml index 6e15dfac7b..54eb1f113d 100644 --- a/reference/info/functions/version-compare.xml +++ b/reference/info/functions/version-compare.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,19 @@ version is lower than the second, 0 if they are equal, and +1 if the second is lower. + + 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). The it + compares the parts startinig from left to right. If a part contains + special version strings these are handled in the following order: + dev < alpha < + a < beta < + b < RC < + pl. + If you specify the third optional operator argument, you can test for a particular relationship. The