<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.arrayiterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'arrayiterator.uksort.php',
    1 => 'ArrayIterator::uksort',
    2 => 'Sort by keys using a user-defined comparison function',
  ),
  'up' => 
  array (
    0 => 'class.arrayiterator.php',
    1 => 'ArrayIterator',
  ),
  'prev' => 
  array (
    0 => 'arrayiterator.uasort.php',
    1 => 'ArrayIterator::uasort',
  ),
  'next' => 
  array (
    0 => 'arrayiterator.unserialize.php',
    1 => 'ArrayIterator::unserialize',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/arrayiterator/uksort.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="arrayiterator.uksort" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ArrayIterator::uksort</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ArrayIterator::uksort</span> &mdash; <span class="dc-title">Sort by keys using a user-defined comparison function</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-arrayiterator.uksort-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ArrayIterator::uksort</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>): <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span></div>

  <p class="para rdfs-comment">
   This method sorts the elements by keys using a user-supplied comparison
   function.
  </p>
  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
 <p class="para">
  Wenn zwei Mitglieder als identisch verglichen werden, behalten sie ihre
  ursprüngliche Reihenfolge bei.
  Vor PHP 8.0.0 war die relative Sortierung im sortierten Array nicht definiert.
 </p>
</p></blockquote>

 </div>


 <div class="refsect1 parameters" id="refsect1-arrayiterator.uksort-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">callback</code></dt>
     <dd>
      <p class="para">
 Die Vergleichsfunktion muss einen Integer kleiner als, gleich oder größer als Null zurückgeben, wenn das erste Argument respektive kleiner, gleich oder größer als das zweite ist.
</p>
<div class="methodsynopsis dc-description"><span class="methodname"><span class="replaceable">callback</span></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$a</code></span>, <span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$b</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

<div class="caution"><strong class="caution">Achtung</strong>
 <p class="para">
  Wenn die Vergleichsfunktion <em>nicht-ganzzahlige</em> Werte
  zurückgibt, z. B. vom Typ <span class="type"><a href="language.types.float.php" class="type float">float</a></span>, wird der Rückgabewert des
  Callbacks intern in den Typ <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> umgewandelt. Werte wie
  <code class="literal">0.99</code> und <code class="literal">0.1</code> werden also beide in
  einen Integer-Wert von <code class="literal">0</code> umgewandelt, wodurch diese Werte
  als gleichwertig eingestuft werden.
 </p>
</div>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-arrayiterator.uksort-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt immer <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-arrayiterator.uksort-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Beschreibung</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
 <td>8.2.0</td>
 <td>
  Der Rückgabewert ist nun <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> vorher war es <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>.
 </td>
</tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-arrayiterator.uksort-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="arrayiterator.asort.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::asort()</a> - Sort entries by values</span></li>
    <li><span class="methodname"><a href="arrayiterator.ksort.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::ksort()</a> - Sort entries by keys</span></li>
    <li><span class="methodname"><a href="arrayiterator.natcasesort.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::natcasesort()</a> - Sort entries naturally, case insensitive</span></li>
    <li><span class="methodname"><a href="arrayiterator.natsort.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::natsort()</a> - Sort entries naturally</span></li>
    <li><span class="methodname"><a href="arrayiterator.uasort.php" class="methodname" rel="rdfs-seeAlso">ArrayIterator::uasort()</a> - Sort with a user-defined comparison function and maintain index association</span></li>
    <li><span class="function"><a href="function.uksort.php" class="function" rel="rdfs-seeAlso">uksort()</a> - Sortiert ein Array nach Schl&uuml;sseln mittels einer benutzerdefinierten Vergleichsfunktion</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>