mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
u?sort: add ¬e.func-callback;
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@65802 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
db359acf34
commit
aaf015874c
1 changed files with 17 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.142 $ -->
|
||||
<!-- $Revision: 1.143 $ -->
|
||||
<reference id="ref.array">
|
||||
<title>Array Functions</title>
|
||||
<titleabbrev>Arrays</titleabbrev>
|
||||
|
@ -3469,6 +3469,7 @@ fruits[3] = orange
|
|||
comparison functions.
|
||||
</para>
|
||||
</note>
|
||||
¬e.func-callback;
|
||||
<para>
|
||||
See also: <function>usort</function>, <function>uksort</function>,
|
||||
<function>sort</function>, <function>asort</function>,
|
||||
|
@ -3500,10 +3501,9 @@ fruits[3] = orange
|
|||
needs to be sorted by some non-trivial criteria, you should use
|
||||
this function.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>uksort</function> example</title>
|
||||
<programlisting role="php">
|
||||
<example>
|
||||
<title><function>uksort</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
function cmp ($a, $b) {
|
||||
if ($a == $b) return 0;
|
||||
|
@ -3518,9 +3518,8 @@ while (list ($key, $value) = each ($a)) {
|
|||
echo "$key: $value\n";
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
This example would display:
|
||||
</para>
|
||||
|
@ -3536,6 +3535,7 @@ while (list ($key, $value) = each ($a)) {
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
¬e.func-callback;
|
||||
<para>
|
||||
See also: <function>usort</function>, <function>uasort</function>,
|
||||
<function>sort</function>, <function>asort</function>,
|
||||
|
@ -3670,6 +3670,7 @@ $fruits[2]: lemons
|
|||
<function>usort</function> example using a member function of an object
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
class TestObj {
|
||||
var $name;
|
||||
|
||||
|
@ -3697,6 +3698,7 @@ uasort($a, array ("TestObj", "cmp_obj"));
|
|||
foreach ($a as $item) {
|
||||
print $item->name."\n";
|
||||
}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
@ -3712,15 +3714,13 @@ d
|
|||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
<warning>
|
||||
<para>
|
||||
The underlying quicksort function in some C libraries (such as
|
||||
on Solaris systems) may cause PHP to crash if the comparison
|
||||
function does not return consistent values.
|
||||
</para>
|
||||
</warning>
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
The underlying quicksort function in some C libraries (such as
|
||||
on Solaris systems) may cause PHP to crash if the comparison
|
||||
function does not return consistent values.
|
||||
</para>
|
||||
</warning>
|
||||
<para>
|
||||
See also: <function>uasort</function>,
|
||||
<function>uksort</function>, <function>sort</function>,
|
||||
|
|
Loading…
Reference in a new issue