WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Internal

RestApiUtil::is_associative() private WC 1.0

Is an array sequential or associative?

{} It's a method of the class: RestApiUtil{}

No Hooks.

Return

true|false. True if the array is associative, false if it's sequential.

Usage

$result = RestApiUtil::is_associative( $array );
$array(array) (required)
The array to check.

Code of RestApiUtil::is_associative() WC 5.9.0

private static function is_associative( array $array ) {
	return array_keys( $array ) !== range( 0, count( $array ) - 1 );
}