PHPackages                             clarkeash/converter - 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. clarkeash/converter

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

clarkeash/converter
===================

Convert units

16PHP

Since Sep 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/clarkeash/converter)[ Packagist](https://packagist.org/packages/clarkeash/converter)[ RSS](/packages/clarkeash-converter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Convert
=======

[](#convert)

Convert metrics from one form to another.

 [ ![](https://camo.githubusercontent.com/8edece3faf8b46d8e2c809778b2b5b33410201a1f7ec8d40406b6183aefd95b0/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636c61726b656173682f636f6e7665727465722e7376673f7374796c653d666c61742d737175617265) ](https://travis-ci.org/clarkeash/converter) [ ![](https://camo.githubusercontent.com/aeb01b94b88856dd65bb7962b8911720952d8d9c7c41974ae392397f542422fa/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636c61726b656173682f636f6e7665727465722e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/clarkeash/converter/code-structure/master/code-coverage) [ ![](https://camo.githubusercontent.com/ce958ca87ec3bcd5f14f75ad6064f566b121575e6cede57a42cfd7235545b5a0/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636c61726b656173682f636f6e7665727465722e7376673f7374796c653d666c61742d737175617265) ](https://scrutinizer-ci.com/g/clarkeash/converter) [ ![](https://camo.githubusercontent.com/f9f5aa0936b0aa6dd2ac5fb20afcf76b4c0f0998a2787c858397b946d6b80e5a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636c61726b656173682f636f6e7665727465722e7376673f7374796c653d666c61742d737175617265) ](https://github.com/clarkeash/converter/blob/master/LICENSE) [ ![](https://camo.githubusercontent.com/5438de899f236ffc7660c88780dcf6172a8c03560f6fa4aada3b8e573f8510e5/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40636c61726b656173682d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/clarkeash)

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

[](#installation)

```
composer require clarkeash/converter
```

Usage
-----

[](#usage)

### Convert Memory Sizes

[](#convert-memory-sizes)

```
Convert::size()->of(500)->megabytes()->to()->gigabytes(); // 0.5
Convert::size()->of(2)->mebibytes()->to()->bytes(); // 2097152
```

See the [Size class](https://github.com/clarkeash/converter/blob/master/src/Metrics/Size.php) to see all the available conversion methods.

### Convert Time

[](#convert-time)

```
Convert::time()->from(3)->weeks()->to()->days(); // 21
Convert::time()->from(4)->scores()->and(7)->years()->into()->years(); // 87
```

See the [Time class](https://github.com/clarkeash/converter/blob/master/src/Metrics/Time.php) to see all the available conversion methods.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4aa56557de1c571ed78fb23fda585f3fd461425339df673fb293c609a6719c81?d=identicon)[clarkeash](/maintainers/clarkeash)

---

Top Contributors

[![clarkeash](https://avatars.githubusercontent.com/u/1612186?v=4)](https://github.com/clarkeash "clarkeash (16 commits)")

### Embed Badge

![Health badge](/badges/clarkeash-converter/health.svg)

```
[![Health](https://phpackages.com/badges/clarkeash-converter/health.svg)](https://phpackages.com/packages/clarkeash-converter)
```

###  Alternatives

[chriskonnertz/open-graph

Class that assists in building Open Graph meta tags

116449.2k3](/packages/chriskonnertz-open-graph)

PHPackages © 2026

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