src/Parser.php
public static function toRoman(int $num) : string
    {
        $result = '';
        foreach (self::$romans as $roman => $value) {
            $matches = intval($num / $value);
            $result .= str_repeat($roman, $matches);
            $num     = $num % $value;
        }
        return $result;
    }
public static function toRoman(int $num) : string
    {
        $result = '';
        foreach (self::$romans as $roman => $value) {
            $matches = intval($num / $value);
            $result .= str_repeat($roman, $matches);
            $num     = $num % $value;
        }
        return $result;
    }
public static function toRoman ( int $ num ) : string { $ result = '' ; foreach ( self :: $ romans as $ roman => $ value ) { $ matches = intval ( $ num / $ value ) ; $ result .= str_repeat ( $ roman , $ matches ) ; $ num = $ num % $ value ; } return $ result ; }
convert decimal to roman numerals
@param  int    $num decimal
@return string      roman numerals
convert decimal to roman numerals