private function accumulateUsedChars(array $usedChars, $value) { for ($j = 0; $j < strlen($value); $j++) { $char = $value[$j]; if (!isset($usedChars[$char])) { $usedChars[$char] = 0; } $usedChars[$char]++; } return $usedChars; }