This version is outdated. You should upgrade your project to Mako 12.1!
Learn more

Number helper



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


Usage

The phparabic2roman method converts Arabic numerals to roman numerals.

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

The number must be between 1 and 3999.

The phproman2arabic method will convert roman numerals to Arabic numerals.

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

The number must be between I and MMMCMXCIX.