PHPackages                             komakino/roman-numerals - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. komakino/roman-numerals

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

komakino/roman-numerals
=======================

v1.0.3(6y ago)514.5k1[1 issues](https://github.com/komakino/roman-numerals/issues)[1 PRs](https://github.com/komakino/roman-numerals/pulls)MITPHP

Since Feb 13Pushed 4y ago2 watchersCompare

[ Source](https://github.com/komakino/roman-numerals)[ Packagist](https://packagist.org/packages/komakino/roman-numerals)[ RSS](/packages/komakino-roman-numerals/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

Roman Numerals
==============

[](#roman-numerals)

Composer package for conversion between integer values and roman numerals.

Handles numbers from 0 to 3999. For 0 the string 'nulla' is used.

Installation
------------

[](#installation)

To add this package as a dependency to your project, simply add a dependency on `komakino/roman-numerals` to your project's `composer.json` file.

```
    {
        "require": {
            "komakino/roman-numerals": "*"
        }
    }
```

Usage
-----

[](#usage)

```
use Komakino\RomanNumerals\RomanNumerals;

$roman   = RomanNumerals::to(2016);       // returns 'MMXVI'
$integer = RomanNumerals::from('DCLXVI'); // returns 666
```

### Public static methods

[](#public-static-methods)

- string **to**($integer)

    - Converts integer to roman numerals
    - If integer is negativ, an **OutOfBoundsException** is thrown
    - If integer is larger or equal to 4000, an **OutOfBoundsException** is thrown
- string **from**($string)

    - Converts roman numerals to integer
    - If string contains illegal characters, an **InvalidArgumentException** is thrown

Changelog
---------

[](#changelog)

### v1.0.0

[](#v100)

- Initial public release

### v1.0.1

[](#v101)

- New README file

### v1.0.2

[](#v102)

- Added license and author to composer.json

### v1.0.3

[](#v103)

- Added LICENSE file

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~433 days

Total

4

Last Release

2486d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d2e89d042293e6d2589ecec3813563553b0a6f1ce86a777a421dd759bcb95a1?d=identicon)[komakino](/maintainers/komakino)

---

Top Contributors

[![komakino](https://avatars.githubusercontent.com/u/863727?v=4)](https://github.com/komakino "komakino (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/komakino-roman-numerals/health.svg)

```
[![Health](https://phpackages.com/badges/komakino-roman-numerals/health.svg)](https://phpackages.com/packages/komakino-roman-numerals)
```

###  Alternatives

[mybb/gravatar

Easy Gravatar generation for Laravel 5.0.

121.5k](/packages/mybb-gravatar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
