mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Remove informal language from version_compare()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333759 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
70a3ab93ed
commit
72a7d33dff
1 changed files with 10 additions and 14 deletions
|
@ -16,15 +16,13 @@
|
|||
</methodsynopsis>
|
||||
<para>
|
||||
<function>version_compare</function> 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.
|
||||
</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). Then it
|
||||
compares the parts starting from left to right. If a part contains
|
||||
special version strings these are handled in the following order:
|
||||
<literal>any string not found in this list</literal> <
|
||||
|
@ -62,19 +60,17 @@
|
|||
<term><parameter>operator</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If you specify the third optional <parameter>operator</parameter>
|
||||
argument, you can test for a particular relationship. The
|
||||
possible operators are: <literal><</literal>,
|
||||
<literal>lt</literal>, <literal><=</literal>,
|
||||
<literal>le</literal>, <literal>></literal>,
|
||||
<literal>gt</literal>, <literal>>=</literal>,
|
||||
<literal>ge</literal>, <literal>==</literal>,
|
||||
<literal>=</literal>, <literal>eq</literal>,
|
||||
<literal>!=</literal>, <literal><></literal>,
|
||||
<literal>ne</literal> respectively.
|
||||
If the third optional <parameter>operator</parameter> argument is
|
||||
specified, test for a particular relationship. The possible operators
|
||||
are: <literal><</literal>, <literal>lt</literal>,
|
||||
<literal><=</literal>, <literal>le</literal>, <literal>></literal>,
|
||||
<literal>gt</literal>, <literal>>=</literal>, <literal>ge</literal>,
|
||||
<literal>==</literal>, <literal>=</literal>, <literal>eq</literal>,
|
||||
<literal>!=</literal>, <literal><></literal>, <literal>ne</literal>
|
||||
respectively.
|
||||
</para>
|
||||
<para>
|
||||
This parameter is case-sensitive, so values should be lowercase.
|
||||
This parameter is case-sensitive, values should be lowercase.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
Loading…
Reference in a new issue