nikolaposa/num-converter

PHP library which provides consistent interface for converting numbers between various numeral systems.

v1.0.3 2016-04-09 21:21 UTC

This package is auto-updated.

Last update: 2022-08-06 18:11:31 UTC


README

Build Status

PHP library which provides consistent interface for converting numbers between various numeral systems, for example Binary, Hexadecimal, Roman, etc.

Installation

The preferred method of installation is via Composer. Run the following command to install the latest version of a package and add it to your project's composer.json:

composer require nikolaposa/num-converter

Usage

<?php
use NumConverter\StaticConverter as NumConverter;
use NumConverter\NumeralSystems;

echo NumConverter::convert(2015, NumeralSystems::DECIMAL, NumeralSystems::ROMAN); //MMXV

See more examples.

Author

Nikola Poša

Copyright and license

Copyright 2017 Nikola Poša. Released under MIT License - see the LICENSE file for details.