The NumberFormatter class can be used to convert integer numbers to Roman numerals without a custom function using an array of symbols and associated values:<?phpfunction intToRomanNumeral(int $num) { static $nf = new NumberFormatter('@numbers=roman', NumberFormatter::DECIMAL...
Such systems lead naturally to the earliest ways of representing numbers in written form, as in the systems of Babylonian, Egyptian, Greek, Chinese, and Roman numerals; but such notations are comparatively inconvenient for performing arithmetic operations except in the simplest cases. During the ...