25 149 => [
'CVLIV',
'CIL'],
30 199 => [
'CVCIV',
'CIC'],
35 249 => [
'CCVLIV',
'CCIL'],
40 299 => [
'CCVCIV',
'CCIC'],
45 349 => [
'CCCVLIV',
'CCCIL'],
50 399 => [
'CCCVCIV',
'CCCIC'],
55 449 => [
'CDVLIV',
'CDIL'],
96 490 => [
'LDXL',
'XD'],
97 491 => [
'LDXLI',
'XDI'],
98 492 => [
'LDXLII',
'XDII'],
99 493 => [
'LDXLIII',
'XDIII'],
100 494 => [
'LDXLIV',
'XDIV'],
101 495 => [
'LDVL',
'XDV',
'VD'],
102 496 => [
'LDVLI',
'XDVI',
'VDI'],
103 497 => [
'LDVLII',
'XDVII',
'VDII'],
104 498 => [
'LDVLIII',
'XDVIII',
'VDIII'],
105 499 => [
'LDVLIV',
'XDIX',
'VDIV',
'ID'],
110 549 => [
'DVLIV',
'DIL'],
115 599 => [
'DVCIV',
'DIC'],
120 649 => [
'DCVLIV',
'DCIL'],
125 699 => [
'DCVCIV',
'DCIC'],
130 749 => [
'DCCVLIV',
'DCCIL'],
135 799 => [
'DCCVCIV',
'DCCIC'],
139 848 => [
'DCCCVLIII'],
140 849 => [
'DCCCVLIV',
'DCCCIL'],
144 898 => [
'DCCCVCIII'],
145 899 => [
'DCCCVCIV',
'DCCCIC'],
150 949 => [
'CMVLIV',
'CMIL'],
189 988 => [
'LMXXXVIII'],
191 990 => [
'LMXL',
'XM'],
192 991 => [
'LMXLI',
'XMI'],
193 992 => [
'LMXLII',
'XMII'],
194 993 => [
'LMXLIII',
'XMIII'],
195 994 => [
'LMXLIV',
'XMIV'],
196 995 => [
'LMVL',
'XMV',
'VM'],
197 996 => [
'LMVLI',
'XMVI',
'VMI'],
198 997 => [
'LMVLII',
'XMVII',
'VMII'],
199 998 => [
'LMVLIII',
'XMVIII',
'VMIII'],
200 999 => [
'LMVLIV',
'XMIX',
'VMIV',
'IM'],
205 1049 => [
'MVLIV',
'MIL'],
210 1099 => [
'MVCIV',
'MIC'],
215 1149 => [
'MCVLIV',
'MCIL'],
220 1199 => [
'MCVCIV',
'MCIC'],
224 1248 => [
'MCCVLIII'],
225 1249 => [
'MCCVLIV',
'MCCIL'],
229 1298 => [
'MCCVCIII'],
230 1299 => [
'MCCVCIV',
'MCCIC'],
233 1347 => [
'MCCCVLII'],
234 1348 => [
'MCCCVLIII'],
235 1349 => [
'MCCCVLIV',
'MCCCIL'],
238 1397 => [
'MCCCVCII'],
239 1398 => [
'MCCCVCIII'],
240 1399 => [
'MCCCVCIV',
'MCCCIC'],
244 1448 => [
'MCDVLIII'],
245 1449 => [
'MCDVLIV',
'MCDIL'],
264 1468 => [
'MLDXVIII'],
269 1473 => [
'MLDXXIII'],
273 1477 => [
'MLDXXVII'],
274 1478 => [
'MLDXXVIII'],
278 1482 => [
'MLDXXXII'],
279 1483 => [
'MLDXXXIII'],
280 1484 => [
'MLDXXXIV'],
282 1486 => [
'MLDXXXVI'],
283 1487 => [
'MLDXXXVII'],
284 1488 => [
'MLDXXXVIII'],
285 1489 => [
'MLDXXXIX'],
286 1490 => [
'MLDXL',
'MXD'],
287 1491 => [
'MLDXLI',
'MXDI'],
288 1492 => [
'MLDXLII',
'MXDII'],
289 1493 => [
'MLDXLIII',
'MXDIII'],
290 1494 => [
'MLDXLIV',
'MXDIV'],
291 1495 => [
'MLDVL',
'MXDV',
'MVD'],
292 1496 => [
'MLDVLI',
'MXDVI',
'MVDI'],
293 1497 => [
'MLDVLII',
'MXDVII',
'MVDII'],
294 1498 => [
'MLDVLIII',
'MXDVIII',
'MVDIII'],
295 1499 => [
'MLDVLIV',
'MXDIX',
'MVDIV',
'MID'],
300 1549 => [
'MDVLIV',
'MDIL'],
305 1599 => [
'MDVCIV',
'MDIC'],
309 1648 => [
'MDCVLIII'],
310 1649 => [
'MDCVLIV',
'MDCIL'],
314 1698 => [
'MDCVCIII'],
315 1699 => [
'MDCVCIV',
'MDCIC'],
318 1747 => [
'MDCCVLII'],
319 1748 => [
'MDCCVLIII'],
320 1749 => [
'MDCCVLIV',
'MDCCIL'],
323 1797 => [
'MDCCVCII'],
324 1798 => [
'MDCCVCIII'],
325 1799 => [
'MDCCVCIV',
'MDCCIC'],
327 1846 => [
'MDCCCVLI'],
328 1847 => [
'MDCCCVLII'],
329 1848 => [
'MDCCCVLIII'],
330 1849 => [
'MDCCCVLIV',
'MDCCCIL'],
332 1896 => [
'MDCCCVCI'],
333 1897 => [
'MDCCCVCII'],
334 1898 => [
'MDCCCVCIII'],
335 1899 => [
'MDCCCVCIV',
'MDCCCIC'],
339 1948 => [
'MCMVLIII'],
340 1949 => [
'MCMVLIV',
'MCMIL'],
359 1968 => [
'MLMXVIII'],
364 1973 => [
'MLMXXIII'],
368 1977 => [
'MLMXXVII'],
369 1978 => [
'MLMXXVIII'],
373 1982 => [
'MLMXXXII'],
374 1983 => [
'MLMXXXIII'],
375 1984 => [
'MLMXXXIV'],
377 1986 => [
'MLMXXXVI'],
378 1987 => [
'MLMXXXVII'],
379 1988 => [
'MLMXXXVIII'],
380 1989 => [
'MLMXXXIX'],
381 1990 => [
'MLMXL',
'MXM'],
382 1991 => [
'MLMXLI',
'MXMI'],
383 1992 => [
'MLMXLII',
'MXMII'],
384 1993 => [
'MLMXLIII',
'MXMIII'],
385 1994 => [
'MLMXLIV',
'MXMIV'],
386 1995 => [
'MLMVL',
'MXMV',
'MVM'],
387 1996 => [
'MLMVLI',
'MXMVI',
'MVMI'],
388 1997 => [
'MLMVLII',
'MXMVII',
'MVMII'],
389 1998 => [
'MLMVLIII',
'MXMVIII',
'MVMIII'],
390 1999 => [
'MLMVLIV',
'MXMIX',
'MVMIV',
'MIM'],
395 2049 => [
'MMVLIV',
'MMIL'],
400 2099 => [
'MMVCIV',
'MMIC'],
404 2148 => [
'MMCVLIII'],
405 2149 => [
'MMCVLIV',
'MMCIL'],
409 2198 => [
'MMCVCIII'],
410 2199 => [
'MMCVCIV',
'MMCIC'],
413 2247 => [
'MMCCVLII'],
414 2248 => [
'MMCCVLIII'],
415 2249 => [
'MMCCVLIV',
'MMCCIL'],
418 2297 => [
'MMCCVCII'],
419 2298 => [
'MMCCVCIII'],
420 2299 => [
'MMCCVCIV',
'MMCCIC'],
422 2346 => [
'MMCCCVLI'],
423 2347 => [
'MMCCCVLII'],
424 2348 => [
'MMCCCVLIII'],
425 2349 => [
'MMCCCVLIV',
'MMCCCIL'],
427 2396 => [
'MMCCCVCI'],
428 2397 => [
'MMCCCVCII'],
429 2398 => [
'MMCCCVCIII'],
430 2399 => [
'MMCCCVCIV',
'MMCCCIC'],
433 2447 => [
'MMCDVLII'],
434 2448 => [
'MMCDVLIII'],
435 2449 => [
'MMCDVLIV',
'MMCDIL'],
444 2458 => [
'MMLDVIII'],
449 2463 => [
'MMLDXIII'],
453 2467 => [
'MMLDXVII'],
454 2468 => [
'MMLDXVIII'],
458 2472 => [
'MMLDXXII'],
459 2473 => [
'MMLDXXIII'],
460 2474 => [
'MMLDXXIV'],
462 2476 => [
'MMLDXXVI'],
463 2477 => [
'MMLDXXVII'],
464 2478 => [
'MMLDXXVIII'],
465 2479 => [
'MMLDXXIX'],
467 2481 => [
'MMLDXXXI'],
468 2482 => [
'MMLDXXXII'],
469 2483 => [
'MMLDXXXIII'],
470 2484 => [
'MMLDXXXIV'],
471 2485 => [
'MMLDXXXV'],
472 2486 => [
'MMLDXXXVI'],
473 2487 => [
'MMLDXXXVII'],
474 2488 => [
'MMLDXXXVIII'],
475 2489 => [
'MMLDXXXIX'],
476 2490 => [
'MMLDXL',
'MMXD'],
477 2491 => [
'MMLDXLI',
'MMXDI'],
478 2492 => [
'MMLDXLII',
'MMXDII'],
479 2493 => [
'MMLDXLIII',
'MMXDIII'],
480 2494 => [
'MMLDXLIV',
'MMXDIV'],
481 2495 => [
'MMLDVL',
'MMXDV',
'MMVD'],
482 2496 => [
'MMLDVLI',
'MMXDVI',
'MMVDI'],
483 2497 => [
'MMLDVLII',
'MMXDVII',
'MMVDII'],
484 2498 => [
'MMLDVLIII',
'MMXDVIII',
'MMVDIII'],
485 2499 => [
'MMLDVLIV',
'MMXDIX',
'MMVDIV',
'MMID'],
489 2548 => [
'MMDVLIII'],
490 2549 => [
'MMDVLIV',
'MMDIL'],
494 2598 => [
'MMDVCIII'],
495 2599 => [
'MMDVCIV',
'MMDIC'],
498 2647 => [
'MMDCVLII'],
499 2648 => [
'MMDCVLIII'],
500 2649 => [
'MMDCVLIV',
'MMDCIL'],
503 2697 => [
'MMDCVCII'],
504 2698 => [
'MMDCVCIII'],
505 2699 => [
'MMDCVCIV',
'MMDCIC'],
507 2746 => [
'MMDCCVLI'],
508 2747 => [
'MMDCCVLII'],
509 2748 => [
'MMDCCVLIII'],
510 2749 => [
'MMDCCVLIV',
'MMDCCIL'],
512 2796 => [
'MMDCCVCI'],
513 2797 => [
'MMDCCVCII'],
514 2798 => [
'MMDCCVCIII'],
515 2799 => [
'MMDCCVCIV',
'MMDCCIC'],
516 2845 => [
'MMDCCCVL'],
517 2846 => [
'MMDCCCVLI'],
518 2847 => [
'MMDCCCVLII'],
519 2848 => [
'MMDCCCVLIII'],
520 2849 => [
'MMDCCCVLIV',
'MMDCCCIL'],
521 2895 => [
'MMDCCCVC'],
522 2896 => [
'MMDCCCVCI'],
523 2897 => [
'MMDCCCVCII'],
524 2898 => [
'MMDCCCVCIII'],
525 2899 => [
'MMDCCCVCIV',
'MMDCCCIC'],
528 2947 => [
'MMCMVLII'],
529 2948 => [
'MMCMVLIII'],
530 2949 => [
'MMCMVLIV',
'MMCMIL'],
539 2958 => [
'MMLMVIII'],
544 2963 => [
'MMLMXIII'],
548 2967 => [
'MMLMXVII'],
549 2968 => [
'MMLMXVIII'],
553 2972 => [
'MMLMXXII'],
554 2973 => [
'MMLMXXIII'],
555 2974 => [
'MMLMXXIV'],
557 2976 => [
'MMLMXXVI'],
558 2977 => [
'MMLMXXVII'],
559 2978 => [
'MMLMXXVIII'],
560 2979 => [
'MMLMXXIX'],
562 2981 => [
'MMLMXXXI'],
563 2982 => [
'MMLMXXXII'],
564 2983 => [
'MMLMXXXIII'],
565 2984 => [
'MMLMXXXIV'],
566 2985 => [
'MMLMXXXV'],
567 2986 => [
'MMLMXXXVI'],
568 2987 => [
'MMLMXXXVII'],
569 2988 => [
'MMLMXXXVIII'],
570 2989 => [
'MMLMXXXIX'],
571 2990 => [
'MMLMXL',
'MMXM'],
572 2991 => [
'MMLMXLI',
'MMXMI'],
573 2992 => [
'MMLMXLII',
'MMXMII'],
574 2993 => [
'MMLMXLIII',
'MMXMIII'],
575 2994 => [
'MMLMXLIV',
'MMXMIV'],
576 2995 => [
'MMLMVL',
'MMXMV',
'MMVM'],
577 2996 => [
'MMLMVLI',
'MMXMVI',
'MMVMI'],
578 2997 => [
'MMLMVLII',
'MMXMVII',
'MMVMII'],
579 2998 => [
'MMLMVLIII',
'MMXMVIII',
'MMVMIII'],
580 2999 => [
'MMLMVLIV',
'MMXMIX',
'MMVMIV',
'MMIM'],
584 3048 => [
'MMMVLIII'],
585 3049 => [
'MMMVLIV',
'MMMIL'],
589 3098 => [
'MMMVCIII'],
590 3099 => [
'MMMVCIV',
'MMMIC'],
593 3147 => [
'MMMCVLII'],
594 3148 => [
'MMMCVLIII'],
595 3149 => [
'MMMCVLIV',
'MMMCIL'],
598 3197 => [
'MMMCVCII'],
599 3198 => [
'MMMCVCIII'],
600 3199 => [
'MMMCVCIV',
'MMMCIC'],
602 3246 => [
'MMMCCVLI'],
603 3247 => [
'MMMCCVLII'],
604 3248 => [
'MMMCCVLIII'],
605 3249 => [
'MMMCCVLIV',
'MMMCCIL'],
607 3296 => [
'MMMCCVCI'],
608 3297 => [
'MMMCCVCII'],
609 3298 => [
'MMMCCVCIII'],
610 3299 => [
'MMMCCVCIV',
'MMMCCIC'],
611 3345 => [
'MMMCCCVL'],
612 3346 => [
'MMMCCCVLI'],
613 3347 => [
'MMMCCCVLII'],
614 3348 => [
'MMMCCCVLIII'],
615 3349 => [
'MMMCCCVLIV',
'MMMCCCIL'],
616 3395 => [
'MMMCCCVC'],
617 3396 => [
'MMMCCCVCI'],
618 3397 => [
'MMMCCCVCII'],
619 3398 => [
'MMMCCCVCIII'],
620 3399 => [
'MMMCCCVCIV',
'MMMCCCIC'],
622 3446 => [
'MMMCDVLI'],
623 3447 => [
'MMMCDVLII'],
624 3448 => [
'MMMCDVLIII'],
625 3449 => [
'MMMCDVLIV',
'MMMCDIL'],
629 3453 => [
'MMMLDIII'],
633 3457 => [
'MMMLDVII'],
634 3458 => [
'MMMLDVIII'],
638 3462 => [
'MMMLDXII'],
639 3463 => [
'MMMLDXIII'],
640 3464 => [
'MMMLDXIV'],
642 3466 => [
'MMMLDXVI'],
643 3467 => [
'MMMLDXVII'],
644 3468 => [
'MMMLDXVIII'],
645 3469 => [
'MMMLDXIX'],
647 3471 => [
'MMMLDXXI'],
648 3472 => [
'MMMLDXXII'],
649 3473 => [
'MMMLDXXIII'],
650 3474 => [
'MMMLDXXIV'],
651 3475 => [
'MMMLDXXV'],
652 3476 => [
'MMMLDXXVI'],
653 3477 => [
'MMMLDXXVII'],
654 3478 => [
'MMMLDXXVIII'],
655 3479 => [
'MMMLDXXIX'],
656 3480 => [
'MMMLDXXX'],
657 3481 => [
'MMMLDXXXI'],
658 3482 => [
'MMMLDXXXII'],
659 3483 => [
'MMMLDXXXIII'],
660 3484 => [
'MMMLDXXXIV'],
661 3485 => [
'MMMLDXXXV'],
662 3486 => [
'MMMLDXXXVI'],
663 3487 => [
'MMMLDXXXVII'],
664 3488 => [
'MMMLDXXXVIII'],
665 3489 => [
'MMMLDXXXIX'],
666 3490 => [
'MMMLDXL',
'MMMXD'],
667 3491 => [
'MMMLDXLI',
'MMMXDI'],
668 3492 => [
'MMMLDXLII',
'MMMXDII'],
669 3493 => [
'MMMLDXLIII',
'MMMXDIII'],
670 3494 => [
'MMMLDXLIV',
'MMMXDIV'],
671 3495 => [
'MMMLDVL',
'MMMXDV',
'MMMVD'],
672 3496 => [
'MMMLDVLI',
'MMMXDVI',
'MMMVDI'],
673 3497 => [
'MMMLDVLII',
'MMMXDVII',
'MMMVDII'],
674 3498 => [
'MMMLDVLIII',
'MMMXDVIII',
'MMMVDIII'],
675 3499 => [
'MMMLDVLIV',
'MMMXDIX',
'MMMVDIV',
'MMMID'],
678 3547 => [
'MMMDVLII'],
679 3548 => [
'MMMDVLIII'],
680 3549 => [
'MMMDVLIV',
'MMMDIL'],
683 3597 => [
'MMMDVCII'],
684 3598 => [
'MMMDVCIII'],
685 3599 => [
'MMMDVCIV',
'MMMDIC'],
687 3646 => [
'MMMDCVLI'],
688 3647 => [
'MMMDCVLII'],
689 3648 => [
'MMMDCVLIII'],
690 3649 => [
'MMMDCVLIV',
'MMMDCIL'],
692 3696 => [
'MMMDCVCI'],
693 3697 => [
'MMMDCVCII'],
694 3698 => [
'MMMDCVCIII'],
695 3699 => [
'MMMDCVCIV',
'MMMDCIC'],
696 3745 => [
'MMMDCCVL'],
697 3746 => [
'MMMDCCVLI'],
698 3747 => [
'MMMDCCVLII'],
699 3748 => [
'MMMDCCVLIII'],
700 3749 => [
'MMMDCCVLIV',
'MMMDCCIL'],
701 3795 => [
'MMMDCCVC'],
702 3796 => [
'MMMDCCVCI'],
703 3797 => [
'MMMDCCVCII'],
704 3798 => [
'MMMDCCVCIII'],
705 3799 => [
'MMMDCCVCIV',
'MMMDCCIC'],
706 3845 => [
'MMMDCCCVL'],
707 3846 => [
'MMMDCCCVLI'],
708 3847 => [
'MMMDCCCVLII'],
709 3848 => [
'MMMDCCCVLIII'],
710 3849 => [
'MMMDCCCVLIV',
'MMMDCCCIL'],
711 3895 => [
'MMMDCCCVC'],
712 3896 => [
'MMMDCCCVCI'],
713 3897 => [
'MMMDCCCVCII'],
714 3898 => [
'MMMDCCCVCIII'],
715 3899 => [
'MMMDCCCVCIV',
'MMMDCCCIC'],
717 3946 => [
'MMMCMVLI'],
718 3947 => [
'MMMCMVLII'],
719 3948 => [
'MMMCMVLIII'],
720 3949 => [
'MMMCMVLIV',
'MMMCMIL'],
724 3953 => [
'MMMLMIII'],
728 3957 => [
'MMMLMVII'],
729 3958 => [
'MMMLMVIII'],
733 3962 => [
'MMMLMXII'],
734 3963 => [
'MMMLMXIII'],
735 3964 => [
'MMMLMXIV'],
737 3966 => [
'MMMLMXVI'],
738 3967 => [
'MMMLMXVII'],
739 3968 => [
'MMMLMXVIII'],
740 3969 => [
'MMMLMXIX'],
742 3971 => [
'MMMLMXXI'],
743 3972 => [
'MMMLMXXII'],
744 3973 => [
'MMMLMXXIII'],
745 3974 => [
'MMMLMXXIV'],
746 3975 => [
'MMMLMXXV'],
747 3976 => [
'MMMLMXXVI'],
748 3977 => [
'MMMLMXXVII'],
749 3978 => [
'MMMLMXXVIII'],
750 3979 => [
'MMMLMXXIX'],
751 3980 => [
'MMMLMXXX'],
752 3981 => [
'MMMLMXXXI'],
753 3982 => [
'MMMLMXXXII'],
754 3983 => [
'MMMLMXXXIII'],
755 3984 => [
'MMMLMXXXIV'],
756 3985 => [
'MMMLMXXXV'],
757 3986 => [
'MMMLMXXXVI'],
758 3987 => [
'MMMLMXXXVII'],
759 3988 => [
'MMMLMXXXVIII'],
760 3989 => [
'MMMLMXXXIX'],
761 3990 => [
'MMMLMXL',
'MMMXM'],
762 3991 => [
'MMMLMXLI',
'MMMXMI'],
763 3992 => [
'MMMLMXLII',
'MMMXMII'],
764 3993 => [
'MMMLMXLIII',
'MMMXMIII'],
765 3994 => [
'MMMLMXLIV',
'MMMXMIV'],
766 3995 => [
'MMMLMVL',
'MMMXMV',
'MMMVM'],
767 3996 => [
'MMMLMVLI',
'MMMXMVI',
'MMMVMI'],
768 3997 => [
'MMMLMVLII',
'MMMXMVII',
'MMMVMII'],
769 3998 => [
'MMMLMVLIII',
'MMMXMVIII',
'MMMVMIII'],
770 3999 => [
'MMMLMVLIV',
'MMMXMIX',
'MMMVMIV',
'MMMIM'],
774 private const HUNDREDS = [
'',
'C',
'CC',
'CCC',
'CD',
'D',
'DC',
'DCC',
'DCCC',
'CM'];
775 private const TENS = [
'',
'X',
'XX',
'XXX',
'XL',
'L',
'LX',
'LXX',
'LXXX',
'XC'];
776 private const ONES = [
'',
'I',
'II',
'III',
'IV',
'V',
'VI',
'VII',
'VIII',
'IX'];
782 $origValue = $aValue;
783 $m = \intdiv($aValue, 1000);
785 $c = \intdiv($aValue, 100);
787 $t = \intdiv($aValue, 10);
789 $result = self::THOUSANDS[
$m] . self::HUNDREDS[
$c] . self::TENS[
$t] . self::ONES[$aValue];
791 if (array_key_exists($origValue, self::VALUES)) {
792 $arr = self::VALUES[$origValue];
793 $idx = min($style, count($arr)) - 1;
803 return ($aValue < 0 || $aValue > self::MAX_ROMAN_VALUE) ?
Functions::VALUE() : self::valueOk($aValue, $style);
808 return ($style < 0 || $style > self::MAX_ROMAN_STYLE) ?
Functions::VALUE() : self::styleOk($aValue, $style);
830 return $e->getMessage();
833 return self::calculateRoman((
int) $aValue, (
int)
$style);
static validateNumericNullBool($number)
Many functions accept null/false/true argument treated as 0/0/1.
static calculateRoman(int $aValue, int $style)
static validateNumericNullSubstitution($number, $substitute)
Validate numeric, but allow substitute for null.
static styleOk(int $aValue, int $style)
static evaluate($aValue, $style=0)
ROMAN.
static valueOk(int $aValue, int $style)