Library
Class

Library\Helper\RomanNumber

class RomanNumber

RomanNumber helper

As for all helpers, all methods are statics.

For convenience, the best practice is to use:

use Library\Helper\RomanNumber as RomanNumberHelper;

Properties

static array $romans_numbers
static array $romans_letters
static string $roman_regex

Methods

static bool isRomanNumber($roman $roman = null)

static bool|int romanToInt($str $str = null)

Get the integer equivalent from roman notation

static string intToRoman($a $a = null)

Get the roman notation of a number inferior to 5000

Details

at line 61
static public bool isRomanNumber($roman $roman = null)

Parameters

$roman $roman

Return Value

bool

at line 75
static public bool|int romanToInt($str $str = null)

Get the integer equivalent from roman notation

Parameters

$str $str

Return Value

bool|int

at line 107
static public string intToRoman($a $a = null)

Get the roman notation of a number inferior to 5000

Parameters

$a $a

Return Value

string