protected function wordsLength(array $words)
    {
        $length = [];

        foreach ($words as $word) {
            $pinyin = $this->pinyin->sentence($word);

            $length[md5($pinyin)] = ($pinyin === $word)
                ? 1
                : mb_strlen($word);
        }

        arsort($length);

        return $length;
    }
protected function wordsLength(array $words)
    {
        $length = [];

        foreach ($words as $word) {
            $pinyin = $this->pinyin->sentence($word);

            $length[md5($pinyin)] = ($pinyin === $word)
                ? 1
                : mb_strlen($word);
        }

        arsort($length);

        return $length;
    }
protected function wordsLength ( array $ words ) { $ length = [ ] ; foreach ( $ words as $ word ) { $ pinyin = $ this -> pinyin -> sentence ( $ word ) ; $ length [ md5 ( $ pinyin ) ] = ( $ pinyin === $ word ) ? 1 : mb_strlen ( $ word ) ; } arsort ( $ length ) ; return $ length ; }
Get echo word length and use md5 as key.

@param array $words

@return array
Get echo word length and use md5 as key .