public function romanNumeralsToNumber(string $roman): int
    {
        $num = 0;
        foreach (self::ROMAN_NUMERALS as $key => $value) {
            while (strpos($roman, $value) === 0) {
                $num += $key;
                $roman = substr($roman, strlen($value));
            }
        }

        return $num;
    }