public static function intToRoman($a = null)
    {
        if (is_null($a)) {
            return null;
        }
        if ($a>4999) {
            return null;
        }
        if ($a==0) {
            return self::$romans_letters[0];
        }
        $a = (string) $a;
        $ctt = '';
        $counter = 1;
        for ($i=(strlen($a)-1); $i>=0; $i--) {
            $tmp_ctt = '';
            $char = $a{$i};
            if ($char>0 && $char<4) {
                $index = array_search($counter, self::$romans_numbers);
                $tmp_ctt .= str_pad(self::$romans_letters[$index], $char, self::$romans_letters[$index]);
            } elseif (3<$char && $char<9) {
                $index = array_search($counter, self::$romans_numbers);
                if ($char==4) {
                    $tmp_ctt .= self::$romans_letters[$index];
                }
                $tmp_ctt .= self::$romans_letters[$index+1];
                if ($char>5) {
                    $tmp_ctt .= str_pad(self::$romans_letters[$index], ($char-5), self::$romans_letters[$index]);
                }
            } elseif ($char==9) {
                $index = array_search($counter, self::$romans_numbers);
                $tmp_ctt .= self::$romans_letters[$index].self::$romans_letters[$index+2];
            }
            $counter = $counter*10;
            $ctt = $tmp_ctt.$ctt;
        }
        return $ctt;
    }