PHPackages                             vasymus/unit-conversions - 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. vasymus/unit-conversions

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

vasymus/unit-conversions
========================

Perform unit conversions in PHP.

1.1.1(4y ago)04MITPHPPHP ^8.0

Since Aug 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vasymus/unit-conversions)[ Packagist](https://packagist.org/packages/vasymus/unit-conversions)[ Docs](https://github.com/vasymus/unit-conversions)[ GitHub Sponsors](https://github.com/vasymus)[ RSS](/packages/vasymus-unit-conversions/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

\[Testing\] Perform unit conversions in PHP.
============================================

[](#testing-perform-unit-conversions-in-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b873c289695cdaf208d8a23bf396fb628507200f9162a1cf3dea2c6ad58cc1ec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766173796d75732f756e69742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vasymus/unit-conversions)[![GitHub Tests Action Status](https://camo.githubusercontent.com/13d03dd7f014efe5f6bad5cd9363349e6b87424757b3573d72b4b6f1c0d385fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766173796d75732f756e69742d636f6e76657273696f6e732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/vasymus/unit-conversions/actions?query=workflow%3ATests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/bd0d2b86dbeeb63736d481a4fdddcd8d16462e002fb2c45b3f055fef09588842/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766173796d75732f756e69742d636f6e76657273696f6e732f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/vasymus/unit-conversions/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/43b9b12a6a3a6433c019434b6c2e2d45d20500e73ca3a702f1d562763bd10cca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766173796d75732f756e69742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vasymus/unit-conversions)

---

This package can be used as to scaffold a framework agnostic package. Follow these steps to get started:

1. Press the "Use template" button at the top of this repo to create a new repo with the contents of this unit-conversions
2. Run "./configure.sh" to run a script that will replace all placeholders throughout all the files
3. Have fun creating your package.
4. If you need help creating a package, consider picking up our [Laravel Package Training](https://laravelpackage.training) video course.

---

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.

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

[](#installation)

You can install the package via composer:

```
composer require vasymus/unit-conversions
```

Usage
-----

[](#usage)

```
$unitConversions = new Vasymus\UnitConversions(10);
echo $unitConversions->toLbs(10);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Vasyl Zhdankin](https://github.com/vasymus)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85% 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 ~0 days

Total

4

Last Release

1782d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31481727?v=4)[vasymus](/maintainers/vasymus)[@vasymus](https://github.com/vasymus)

---

Top Contributors

[![vz-spr](https://avatars.githubusercontent.com/u/78029142?v=4)](https://github.com/vz-spr "vz-spr (17 commits)")[![vasymus](https://avatars.githubusercontent.com/u/31481727?v=4)](https://github.com/vasymus "vasymus (3 commits)")

---

Tags

unit-conversionsvasymus

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vasymus-unit-conversions/health.svg)

```
[![Health](https://phpackages.com/badges/vasymus-unit-conversions/health.svg)](https://phpackages.com/packages/vasymus-unit-conversions)
```

###  Alternatives

[spatie/unit-conversions

Perform unit conversions in PHP

343.7k](/packages/spatie-unit-conversions)

PHPackages © 2026

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