PHPackages                             isimmons/weight-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. isimmons/weight-conversions

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

isimmons/weight-conversions
===========================

Weight conversions in PHP

1.1.1(1y ago)19[1 PRs](https://github.com/isimmons/weight-conversions/pulls)MITPHPPHP ^8.3

Since May 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/isimmons/weight-conversions)[ Packagist](https://packagist.org/packages/isimmons/weight-conversions)[ Docs](https://github.com/isimmons/weight-conversions)[ GitHub Sponsors](https://github.com/isimmons)[ RSS](/packages/isimmons-weight-conversions/feed)WikiDiscussions main Synced 1mo ago

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

Weight conversions in PHP
=========================

[](#weight-conversions-in-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3daab52c82ee723318bc6dc514626ee6c48b9cce67e14ec35dee71c5fbd8a44c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6973696d6d6f6e732f7765696768742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/isimmons/weight-conversions)[![Tests](https://camo.githubusercontent.com/37a518011447ff94d61c16177c9ab76c84f3e1339e989ff1f17fb5224b3ffc16/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6973696d6d6f6e732f7765696768742d636f6e76657273696f6e732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/isimmons/weight-conversions/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/87d1062e07248030c824c568ca7da6fc9bbac5e6c9d19e59e3d6cc6e619e3d0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6973696d6d6f6e732f7765696768742d636f6e76657273696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/isimmons/weight-conversions)

Convert any number of units in grams or kilograms to pounds or stones

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

[](#installation)

You can install the package via composer:

```
composer require isimmons/weight-conversions
```

Basic Usage
-----------

[](#basic-usage)

```
use Isimmons\WeightConversions\Weight;

include 'vendor/autoload.php';

$amount = 100;
$pounds_from_grams = Weight::grams($amount)->toPounds();

$pounds_from_kilograms = Weight::kilograms($amount)->toPounds();

echo "$amount grams = $pounds_from_grams pounds." . PHP_EOL;
echo "$amount kilograms = $pounds_from_kilograms pounds.\n" . PHP_EOL;
```

Available Methods
-----------------

[](#available-methods)

- toPounds
- toStones

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Ian Simmons](https://github.com/isimmons)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.3% 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

3

Last Release

723d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82a7587bb74050250c833f5afd77779c112ff1179ab2c91d1b78d5aa6a70ea6b?d=identicon)[isimmons](/maintainers/isimmons)

---

Top Contributors

[![isimmons](https://avatars.githubusercontent.com/u/1780886?v=4)](https://github.com/isimmons "isimmons (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

package-developmentphpweight-conversionsisimmons

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/isimmons-weight-conversions/health.svg)

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

###  Alternatives

[qinchen/web-utils

A web application common utils

111.4k](/packages/qinchen-web-utils)

PHPackages © 2026

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