public static function isAssoc(array $arr)
    {
        return (is_array($arr) && (!count($arr) || count(array_filter(array_keys($arr),'is_string')) == count($arr)));
    }
public static function isAssoc(array $arr)
    {
        return (is_array($arr) && (!count($arr) || count(array_filter(array_keys($arr),'is_string')) == count($arr)));
    }
public static function isAssoc ( array $ arr ) { return ( is_array ( $ arr ) && ( ! count ( $ arr ) || count ( array_filter ( array_keys ( $ arr ) , 'is_string' ) ) == count ( $ arr ) ) ) ; }
Test if array is an associative array

Note that this function will return true if an array is empty. Meaning
empty arrays will be treated as if they are associative arrays.

@param array $arr

@return boolean
Test if array is an associative array