ArrayIterator::ksort

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

ArrayIterator::ksortSort entries by keys

Descripción

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

Sorts entries by their keys.

Nota:

Si dos miembros se comparan como iguales, su orden relativo en el array oredenado será indefinido.

Parámetros

flags

The optional second parameter flags may be used to modify the sorting behavior using these values:

Sorting type flags:

Valores devueltos

Siempre devuelve true.

Historial de cambios

VersiónDescripción
8.2.0 The return type is true now; previously, it was bool.

Ver también

To Top