mirror of
https://github.com/php/doc-en.git
synced 2026-03-24 15:52:15 +01:00
Update string comparisons possible returns
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-1857.
This commit is contained in:
@@ -744,6 +744,15 @@ function.</simpara></warning>'>
|
||||
</row>
|
||||
'>
|
||||
|
||||
<!ENTITY standard.changelog.binary-safe-string-comparison '<row xmlns="http://docbook.org/ns/docbook">
|
||||
<entry>8.2.0</entry>
|
||||
<entry>
|
||||
This function now returns <literal>-1</literal> or <literal>1</literal>,
|
||||
where it previously returned a negative or positive number.
|
||||
</entry>
|
||||
</row>
|
||||
'>
|
||||
|
||||
<!-- FileInfo -->
|
||||
<!ENTITY fileinfo.parameters.finfo '<para xmlns="http://docbook.org/ns/docbook">An <classname>finfo</classname> instance, returned by <function>finfo_open</function>.</para>'>
|
||||
<!ENTITY fileinfo.changelog.finfo-object '<row xmlns="http://docbook.org/ns/docbook">
|
||||
|
||||
@@ -47,13 +47,30 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; > 0 if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and 0 if they are
|
||||
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and <literal>0</literal> if they are
|
||||
equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -45,13 +45,30 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; > 0 if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and 0 if they are
|
||||
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and <literal>0</literal> if they are
|
||||
equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -49,13 +49,30 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Similar to other string comparison functions, this one returns < 0 if
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter> >
|
||||
0 if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and 0 if they are equal.
|
||||
Similar to other string comparison functions, this one returns <literal>-1</literal> if
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter>
|
||||
<literal>1</literal> if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and <literal>0</literal> if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -48,13 +48,30 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Similar to other string comparison functions, this one returns < 0 if
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter>; >
|
||||
0 if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and 0 if they are equal.
|
||||
Similar to other string comparison functions, this one returns <literal>-1</literal> if
|
||||
<parameter>string1</parameter> is less than <parameter>string2</parameter>;
|
||||
<literal>1</literal> if <parameter>string1</parameter> is greater than
|
||||
<parameter>string2</parameter>, and <literal>0</literal> if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -56,12 +56,29 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; > 0 if <parameter>string1</parameter> is
|
||||
greater than <parameter>string2</parameter>, and 0 if they are equal.
|
||||
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter> is
|
||||
greater than <parameter>string2</parameter>, and <literal>0</literal> if they are equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -59,13 +59,30 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; > 0 if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and 0 if they are
|
||||
Returns <literal>-1</literal> if <parameter>string1</parameter> is less than
|
||||
<parameter>string2</parameter>; <literal>1</literal> if <parameter>string1</parameter>
|
||||
is greater than <parameter>string2</parameter>, and <literal>0</literal> if they are
|
||||
equal.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
&reftitle.changelog;
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>&Version;</entry>
|
||||
<entry>&Description;</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
|
||||
@@ -79,9 +79,9 @@
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns < 0 if <parameter>haystack</parameter> from position
|
||||
<parameter>offset</parameter> is less than <parameter>needle</parameter>, >
|
||||
0 if it is greater than <parameter>needle</parameter>, and 0 if they are equal.
|
||||
Returns <literal>-1</literal> if <parameter>haystack</parameter> from position
|
||||
<parameter>offset</parameter> is less than <parameter>needle</parameter>, <literal>1</literal>
|
||||
if it is greater than <parameter>needle</parameter>, and <literal>0</literal> if they are equal.
|
||||
If <parameter>offset</parameter> is equal to (prior to PHP 7.2.18, 7.3.5) or
|
||||
greater than the length of <parameter>haystack</parameter>, or the
|
||||
<parameter>length</parameter> is set and is less than 0,
|
||||
@@ -102,6 +102,7 @@
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
&standard.changelog.binary-safe-string-comparison;
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
|
||||
Reference in New Issue
Block a user