cvs: phpdoc /en/reference/info/functions version-compare.xml

From: Date: Sun, 01 Jun 2003 15:10:09 +0000
Subject: cvs: phpdoc /en/reference/info/functions version-compare.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969354149@lists.php.net to get a copy of this message
helly Sun Jun 1 11:10:09 2003 EDT Modified files: /phpdoc/en/reference/info/functions version-compare.xml Log: Add the rules Index: phpdoc/en/reference/info/functions/version-compare.xml diff -u phpdoc/en/reference/info/functions/version-compare.xml:1.2 phpdoc/en/reference/info/functions/version-compare.xml:1.3 --- phpdoc/en/reference/info/functions/version-compare.xml:1.2 Wed Apr 17 02:39:30 2002 +++ phpdoc/en/reference/info/functions/version-compare.xml Sun Jun 1 11:10:09 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/info.xml, last change in rev 1.2 --> <refentry id="function.version-compare"> <refnamediv> @@ -28,6 +28,19 @@ <function>version_compare</function> returns -1 if the first version is lower than the second, 0 if they are equal, and +1 if the second is lower. + </para> + <para> + The function first replaces <literal>_</literal>, <literal>-</literal> + and <literal>+</literal> with a dot <literal>.</literal> in the version + strings and also inserts dots <literal>.</literal> 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: + <literal>dev</literal> &lt; <literal>alpha</literal> &lt; + <literal>a</literal> &lt; <literal>beta</literal> &lt; + <literal>b</literal> &lt; <literal>RC</literal> &lt; + <literal>pl</literal>. </para> <para> If you specify the third optional <parameter>operator</parameter>

« previous php.doc (#969354149) next »