VersionPress\Utils\ArrayUtils::isAssociative PHP Method

isAssociative() public static method

Returns true if the array is associative. Associative being defined as an array containing at least one string key.
public static isAssociative ( mixed $array ) : boolean
$array mixed Array is generally expected but any value may be provided (will return false)
return boolean
    public static function isAssociative($array)
    {
        if (!is_array($array)) {
            return false;
        }
        return (bool) count(array_filter(array_keys($array), 'is_string'));
    }