PHP code for generating and parsing Roman numerals