|
|
| |
1. Convert from Roman to Arabic bug |
|
Reply |
|
|
 Jaroslav | 2012-09-18 08:27:15 |
Hi,
example code
$converter = new ConvertRoman("MMDCCXXVII");
echo $converter->result().'<br>';
returns
MMDCCXXVII2727
Aha, I have to delete the command "print..." in the class.
Good joke ;) |
| |
2. Re: Convert from Roman to Arabic bug |
|
Reply |
|
|
 Jaroslav | 2012-09-18 09:22:40 - In reply to message 1 from Jaroslav |
$number = 8000;
$converter = new ConvertRoman($number);
$rom = $converter->result();
echo $converter->result().'===>';
$converter = new ConvertRoman($rom);
echo $converter->result().'<br>';
returns right values by your class rules
_VMMM===>8000 , right roman value by convention is VIIIM or VIII.M
$number = 4000;
$converter = new ConvertRoman($number);
$rom = $converter->result();
echo $converter->result().'===>';
$converter = new ConvertRoman($rom);
echo $converter->result().'<br>';
returns bad arabic value
M_V===>6000 , right roman value by convention is IVM or IV.M
|
|