code: protected function isMatchingKeys($first, $second, $identical)
      {
          $first_keys  = array_keys($first);
          $second_keys = array_keys($second);
          if ($identical) {
              return ($first_keys === $second_keys);
          }
          sort($first_keys);
          sort($second_keys);
  
          return ($first_keys == $second_keys);
      }
docs: Compares two arrays to see if their key lists match.
  For an identical match, the ordering and types of the keys is significant.
  
  @param array $first         First array.
  @param array $second        Array to compare with.
  @param bool $identical   If true then type anomolies count.
  
  @return bool             True if matching.