public static function convertVoteInput (string $formula) : array
    {
        $ranking = explode('>', $formula);

        foreach ($ranking as &$rank_vote) :
            $rank_vote = explode('=', $rank_vote);

            // Del space at start and end
            foreach ($rank_vote as &$value) :
                $value = trim($value);
            endforeach;
        endforeach;

        return $ranking;
    }
public static function convertVoteInput (string $formula) : array
    {
        $ranking = explode('>', $formula);

        foreach ($ranking as &$rank_vote) :
            $rank_vote = explode('=', $rank_vote);

            // Del space at start and end
            foreach ($rank_vote as &$value) :
                $value = trim($value);
            endforeach;
        endforeach;

        return $ranking;
    }
public static function convertVoteInput ( string $ formula ) : array { $ ranking = explode ( '>' , $ formula ) ; foreach ( $ ranking as & $ rank_vote ) : $ rank_vote = explode ( '=' , $ rank_vote ) ; // Del space at start and end foreach ( $ rank_vote as & $ value ) : $ value = trim ( $ value ) ; endforeach ; endforeach ; return $ ranking ; }
From a string like 'A>B=C=H>G=T>Q'
From a string like A > B = C = H > G = T > Q