src/Arr.php
public static function isAssociative($iterable)
    {
        if ($iterable instanceof Traversable) {
            $iterable = iterator_to_array($iterable);
        }
        if (!is_array($iterable) || $iterable === []) {
            return false;
        }

        return array_keys($iterable) !== range(0, count($iterable) - 1);
    }
public static function isAssociative($iterable)
    {
        if ($iterable instanceof Traversable) {
            $iterable = iterator_to_array($iterable);
        }
        if (!is_array($iterable) || $iterable === []) {
            return false;
        }

        return array_keys($iterable) !== range(0, count($iterable) - 1);
    }
public static function isAssociative ( $ iterable ) { if ( $ iterable instanceof Traversable ) { $ iterable = iterator_to_array ( $ iterable ) ; } if ( ! is_array ( $ iterable ) || $ iterable === [ ] ) { return false ; } return array_keys ( $ iterable ) !== range ( 0 , count ( $ iterable ) - 1 ) ; }
Returns whether the `$iterable` is an associative mapping.

Note: Empty arrays are not.

@param iterable $iterable

@return bool
Returns whether the $iterable is an associative mapping .