Extension:RomanNumbers

The RomanNumbers extension adds a parser function that converts one arabic number to a roman number or vice versa. If the argument is a string, it try to parse the string and convert it in an arabic number, while, if the argument is an arabic number, the parser converts it in a roman number.

The allowed range is from 1 to 9999 on the conversion arabic to roman, while when converting a roman number to an arabic one the conversion range is limited only by PHP variable's size.

Examples

 * returns CXXIII
 * returns 1,592
 * returns always 1,592 (unrecognized chars are skipped)
 * returns always 1,002 (unrecognized chars are skipped)

Code

 * RomanNumbers.php