You are here

function _configuration_is_assoc in Configuration Management 7

Is the given array an associative array. This basically extracts the keys twice to get the numerically ordered keys. It then does a diff with the original array and if there is no key diff then the original array is not associative.

NOTE: If you have non-sequential numerical keys, this will identify the array as assoc.

Borrowed from: http://www.php.net/manual/en/function.is-array.php#96724

Return value

TRUE if the array is an associative array, FALSE otherwise

1 call to _configuration_is_assoc()
_configuration_sanitize in ./configuration.export.inc
"Sanitizes" an array recursively, performing two key operations:

File

./configuration.export.inc, line 775

Code

function _configuration_is_assoc($array) {
  return is_array($array) && (0 !== count(array_diff_key($array, array_keys(array_keys($array)))) || count($array) == 0);
}