Simple functions for numeric conversions.
use cjrasmussen\Number\Convert; $num = Convert::intToOrdinal(153); echo $num; // 153rd $num = Convert::intToEnglish(153); echo $num; // one-hundred fifty-three $num = Convert::intToRoman(153); echo $num; // CLIII
Simply add a dependency on cjrasmussen/number to your composer.json file if you use Composer to manage the dependencies of your project:
composer require cjrasmussen/number
Although it's recommended to use Composer, you can actually include the file(s) any way you want.
Number is MIT licensed.