_usort_by_first_member( array $a, array $b ): int

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Sorts a multidimensional array by first member of each top level member.

Description

Used by uasort() as a callback, should not be used directly.

Parameters

$aarrayrequired
$barrayrequired

Return

int

Source

function _usort_by_first_member( $a, $b ) {
	return strnatcasecmp( $a[0], $b[0] );
}

Changelog

VersionDescription
2.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.