php8.5
Home/ Manual/ spl / arrayiterator/ ArrayIterator::ksort

ArrayIterator::ksort

PHP function Edit on GitHub ✎

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

Sort entries by keys

Function-8-6-0

Description

ArrayIterator::ksort(int $flags = SORT_REGULAR): true

Sorts entries by their keys.

Sort-unstable

Parameters

Return Values

Always

Changelog

VersionDescription
8.6.0This method has been deprecated.

See Also

  • ArrayIterator::asort
  • ArrayIterator::natcasesort
  • ArrayIterator::natsort
  • ArrayIterator::uasort
  • ArrayIterator::uksort
  • ksort()

Source: reference/spl/arrayiterator/ksort.xml · from the official PHP manual (php/doc-en)