src/Alg/Math/RomanNumbers.php
public static function convertToRoman( $integer )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		arsort( self::$roman );
		$roman = "";																		//  initiating roman number
		if( is_numeric( $integer ) && $integer == round( $integer, 0 ) )					//  prove integer by cutting floats
		{
			while( $integer > 0 )
			{
				foreach( self::$roman as $key => $value )									//  all roman number starting with biggest
				{
					if( $integer >= $value )												//  current roman number is in integer
					{
						$roman	.= $key;													//  append roman number
						$integer	-= $value;												//  decrease integer by current value
						break;
					}
				}
			}
			$keys	= array_keys( self::$shorts );
			$values	= array_values( self::$shorts );
			$roman	= str_replace( $keys, $values, $roman );								//  realize shortcuts
			return $roman;
		}
		else
			throw new InvalidArgumentException( "Integer '".$integer."' is invalid." );
	}
public static function convertToRoman( $integer )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		arsort( self::$roman );
		$roman = "";																		//  initiating roman number
		if( is_numeric( $integer ) && $integer == round( $integer, 0 ) )					//  prove integer by cutting floats
		{
			while( $integer > 0 )
			{
				foreach( self::$roman as $key => $value )									//  all roman number starting with biggest
				{
					if( $integer >= $value )												//  current roman number is in integer
					{
						$roman	.= $key;													//  append roman number
						$integer	-= $value;												//  decrease integer by current value
						break;
					}
				}
			}
			$keys	= array_keys( self::$shorts );
			$values	= array_values( self::$shorts );
			$roman	= str_replace( $keys, $values, $roman );								//  realize shortcuts
			return $roman;
		}
		else
			throw new InvalidArgumentException( "Integer '".$integer."' is invalid." );
	}
public static function convertToRoman ( $ integer ) { Deprecation :: getInstance ( ) -> setErrorVersion ( '0.8.5' ) -> setExceptionVersion ( '0.9' ) -> message ( sprintf ( 'Please use %s (%s) instead' , 'public library "CeusMedia/Math"' , 'https://packagist.org/packages/ceus-media/math' ) ) ; arsort ( self :: $ roman ) ; $ roman = "" ; //  initiating roman number
 if ( is_numeric ( $ integer ) && $ integer == round ( $ integer , 0 ) ) //  prove integer by cutting floats
 { while ( $ integer > 0 ) { foreach ( self :: $ roman as $ key => $ value ) //  all roman number starting with biggest
 { if ( $ integer >= $ value ) //  current roman number is in integer
 { $ roman .= $ key ; //  append roman number
 $ integer -= $ value ; //  decrease integer by current value
 break ; } } } $ keys = array_keys ( self :: $ shorts ) ; $ values = array_values ( self :: $ shorts ) ; $ roman = str_replace ( $ keys , $ values , $ roman ) ; //  realize shortcuts
 return $ roman ; } else throw new InvalidArgumentException ( "Integer '" . $ integer . "' is invalid." ) ; }
Converts and returns an arabian number as roman number.
@access		public
@static
@param		int			$integer		Arabian number
@return		string
Converts and returns an arabian number as roman number .