code: 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);
      }
docs: Returns whether the `$iterable` is an associative mapping.
  
  Note: Empty arrays are not.
  
  @param iterable $iterable
  
  @return bool