HackmanC    
Código PHP:
Ver original<?php
/*
 *  Class : RomanEncoder
 *  Clase para convertir números arábigos decimales en representación romana.
 *  Versión 1 (PHP)
 */
class RomanEncoder {
    
         1000000 =>  "m",
          900000 => "cm",
          500000 =>  "d",
          400000 => "cd",
          100000 =>  "c",
           90000 => "xc",
           50000 =>  "l",
           40000 => "xl",
           10000 =>  "x",
            9000 => "Mx",
            5000 =>  "v",
            4000 => "Mv",
            1000 =>  "M",
             900 => "CM",
             500 =>  "D",
             400 => "CD",
             100 =>  "C",
              90 => "XC",
              50 =>  "L",
              40 => "XL",
              10 =>  "X",
               9 => "IX",
               5 =>  "V",
               4 => "IV",
               1 =>  "I"
    );
    
    /*
     *  El método es repetir cada letra o conjunto de letras tantas veces
     *  como la  división entera del número entre el valor de la letra,
     *  mientras se va reduciendo el número al residuo en cada ciclo.
     */
    public function encodeRomanNumber($number) {
        $letter = '';
        foreach ($this->divs as $key => $value) {
            $number %= $key;
        }
        return $letter;
    }
    
    private function insertHTMLstyle($letter) {
        $a = '<span class=\'over\'>'; $b = '</span>';
    }
    
    public function romanNumber() {
        $a = '<span class=\'roman\'>'; $b = '</span>'; $r = rand();             $this->insertHTMLstyle($this->encodeRomanNumber($r)) . $b;
    }
    
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Codificación de Números Romanos</title>
<style type="text/css">
<!--
body { font-family: Courier New, Courier, monospace; font-size: 14px; }
.roman { text-transform: uppercase; }
.over { text-decoration: overline; }
-->
</style>
</head>
 
<body>
<p><?php
$a = new RomanEncoder();
echo $a->romanNumber();
?>
</p>
</body>
</html>