PHPackages                             karimtarekdev/weightify - 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. karimtarekdev/weightify

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

karimtarekdev/weightify
=======================

Weightify: Efficient PHP Weight Conversion Tool offers accurate conversions for units like Metric tons, Kilograms, Grams, Milligrams, Micrograms, Stones, Pounds, and Ounces, catering to diverse needs with a user-friendly interface.

1.0.0(2y ago)120MITPHPPHP ^8.1CI passing

Since Nov 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/KarimTarekDev/Weightify)[ Packagist](https://packagist.org/packages/karimtarekdev/weightify)[ Docs](https://github.com/karimtarekdev/weightify)[ GitHub Sponsors](https://github.com/KarimTarekDev)[ RSS](/packages/karimtarekdev-weightify/feed)WikiDiscussions main Synced 1mo ago

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

Weightify: The Ultimate Weight Conversion Tool
==============================================

[](#weightify-the-ultimate-weight-conversion-tool)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5e7231ffea1f2cd46d04fe2f125ea30308e9b2ccb3258dd8afdb95f16b42ae54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6172696d746172656b6465762f7765696768746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/karimtarekdev/weightify)[![Tests](https://camo.githubusercontent.com/8ab143055b87e1a969f729bfae71bfec42a7d25528cc87a2b2797958476ab503/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b6172696d746172656b6465762f7765696768746966792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/karimtarekdev/weightify/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/a8bc75687ba8f88d357b2a0b55706e81ddbc22f878060b343ef8dd7f805987b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6172696d746172656b6465762f7765696768746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/karimtarekdev/weightify)

 [![](https://camo.githubusercontent.com/50eecc30f863fe17ce2eab7f50dae0f226827e711efd59b65ba196550bae3eae/68747470733a2f2f692e696d6775722e636f6d2f4e6d63735554702e706e67)](https://camo.githubusercontent.com/50eecc30f863fe17ce2eab7f50dae0f226827e711efd59b65ba196550bae3eae/68747470733a2f2f692e696d6775722e636f6d2f4e6d63735554702e706e67)

"Weightify: The Ultimate Weight Conversion Tool" is a streamlined and efficient PHP package for accurate weight conversions. It supports a wide array of units such as Metric tons, Kilograms, Grams, Milligrams, Micrograms, Stones, Pounds, and Ounces, making it an ideal solution for various conversion needs in a user-friendly format.

Features
--------

[](#features)

- Broad Range of Units: Supports conversions between Metric tons, Kilograms, Grams, Milligrams, Micrograms, Stones, Pounds, and Ounces.
- High Precision: Accurate conversions even for very large (metric tons) or very small (micrograms) units.
- User-Friendly: Simple and straightforward interface for easy integration into any PHP project.
- Exception Handling: Robust error management for unsupported units.

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

[](#installation)

You can install the package via composer:

```
composer require karimtarekdev/weightify
```

Supported Units
---------------

[](#supported-units)

- Metric Tons (metric\_ton)
- Kilograms (kg)
- Grams (gram)
- Milligrams (mg)
- Micrograms (microgram)
- Stones (stone)
- Pounds (pound)
- Ounces (ounce)

Basic Conversion
----------------

[](#basic-conversion)

To perform a conversion, use the convert method with the desired units. Here are some examples showcasing the use of different units:

```
$converter = new KarimTarekDev\Weightify\Weightify();

// Convert 2 Metric tons to Pounds
echo $converter->convert(2, 'metric_ton', 'pound') . " lbs\n";

// Convert 1500 Milligrams to Grams
echo $converter->convert(1500, 'mg', 'gram') . " grams\n";

// Convert 3 Stones to Kilograms
echo $converter->convert(3, 'stone', 'kg') . " kg\n";

// Convert 200 Ounces to Micrograms
echo $converter->convert(200, 'ounce', 'microgram') . " micrograms\n";
```

By providing the value, source unit, and target unit, you can perform a wide range of conversions with "Weightify."

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Karim Tarek](https://github.com/KarimTarekDev)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance53

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

902d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fafeafa456090283c3cb2e0d85d48bba02ed371671bffcf52082fde3d84ad81f?d=identicon)[karimtarek](/maintainers/karimtarek)

---

Top Contributors

[![KarimTarekDev](https://avatars.githubusercontent.com/u/151473872?v=4)](https://github.com/KarimTarekDev "KarimTarekDev (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

conversionconverterphpweightKarimTarekDevweightify

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/karimtarekdev-weightify/health.svg)

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

###  Alternatives

[components/mathjs

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.

15.0k3.8k](/packages/components-mathjs)[aura/payload-interface

An interface package for Domain Payload implementations.

13392.7k4](/packages/aura-payload-interface)[njxqlus/filament-lightbox

Lightbox entry for Filament

2054.6k](/packages/njxqlus-filament-lightbox)

PHPackages © 2026

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