public function fromRoman($roman)
    {
        $number = 0;
        foreach ($this->getRomanExceptions() as $withThis => $replaceThis) {
            $roman = str_replace($replaceThis, $withThis, $roman);
        }
        foreach ($this->getRomanValues() as $romanValue => $numberValue) {
            $number += $numberValue * substr_count($roman, $romanValue);
        }
        return $number;
    }
public function fromRoman($roman)
    {
        $number = 0;
        foreach ($this->getRomanExceptions() as $withThis => $replaceThis) {
            $roman = str_replace($replaceThis, $withThis, $roman);
        }
        foreach ($this->getRomanValues() as $romanValue => $numberValue) {
            $number += $numberValue * substr_count($roman, $romanValue);
        }
        return $number;
    }
public function fromRoman ( $ roman ) { $ number = 0 ; foreach ( $ this -> getRomanExceptions ( ) as $ withThis => $ replaceThis ) { $ roman = str_replace ( $ replaceThis , $ withThis , $ roman ) ; } foreach ( $ this -> getRomanValues ( ) as $ romanValue => $ numberValue ) { $ number += $ numberValue * substr_count ( $ roman , $ romanValue ) ; } return $ number ; }
Converts a roman number to a decimal representation

@param string $roman

@return int
Converts a roman number to a decimal representation