mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add the rules
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129732 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3870c76594
commit
7912f8465b
1 changed files with 14 additions and 1 deletions
|
@ -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>
|
||||
|
@ -29,6 +29,19 @@
|
|||
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> < <literal>alpha</literal> <
|
||||
<literal>a</literal> < <literal>beta</literal> <
|
||||
<literal>b</literal> < <literal>RC</literal> <
|
||||
<literal>pl</literal>.
|
||||
</para>
|
||||
<para>
|
||||
If you specify the third optional <parameter>operator</parameter>
|
||||
argument, you can test for a particular relationship. The
|
||||
|
|
Loading…
Reference in a new issue