Number helper


Description


The number helper contains methods that can be useful when working with numbers.


Methods


arabic2roman(int $int)


The arabic2roman method converts arabic numerals to roman numerals. The number must be between 1 and 3999.


echo Num::arabic2roman(1984); // Will print "MCMLXXXIV"

roman2arabic(string $string)


The roman2arabic method will convert roman numerals to arabic numerals. The number must be between I and MMMCMXCIX.


echo Num::roman2arabic('MCMLXXXIV'); // Will print "1984"