array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'arrayiterator.uksort.php', 1 => 'ArrayIterator::uksort', ), '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', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
ArrayIterator::uksort — Sort by keys using a user-defined comparison function
This method sorts the elements by keys using a user-supplied comparison function.
注意:
如果两个成员完全相同,那么它们将保持原来的顺序。 在 PHP 8.0.0 之前,它们在排序数组中的相对顺序是未定义的。
callback
在第一个参数小于,等于或大于第二个参数时,该比较函数必须相应地返回一个小于,等于或大于 0 的整数。
总是返回 true
。