PHPackages                             alonexy/converters - 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. alonexy/converters

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

alonexy/converters
==================

Is Unit of Measure Converter.

v1.0.1(2y ago)376CC-BY-SA-4.0PHPPHP &gt;=5.6CI failing

Since Apr 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/alonexy/converters)[ Packagist](https://packagist.org/packages/alonexy/converters)[ Docs](https://github.com/alonexy/converters)[ RSS](/packages/alonexy-converters/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

单位转换器
=====

[](#单位转换器)

质量转换器
-----

[](#质量转换器)

- 常衡制
- 金衡制
- 公制
- 市制

```

use Alonexy\Converter\QualityConverter;
use Alonexy\Converter\Quality;

var_dump(QualityConverter::Parse(1, Quality::METRIC_TONNE, 10)->ConvertTo(Quality::METRIC_KILO_GARM,4));
var_dump(QualityConverter::Parse(1, Quality::METRIC_TONNE, 10)->ConvertTo(Quality::METRIC_GRAM,4));
var_dump(QualityConverter::Parse(1, Quality::METRIC_TONNE, 10)->ConvertTo(Quality::METRIC_MILLI_GRAM,4));

var_dump(QualityConverter::Parse(1, Quality::AVOIR_OUNCE, 10)->ConvertTo(Quality::METRIC_GRAM,7));
var_dump(QualityConverter::Parse(1, Quality::TROY_OUNCE, 10)->ConvertTo(Quality::METRIC_GRAM,7));

```

### 常量表

[](#常量表)

常量解释METRIC\_TONNE吨METRIC\_KILO\_GARM千克METRIC\_GRAM克METRIC\_MILLI\_GRAM毫克METRIC\_MICRO\_GRAM微克MARKET\_JIN斤MARKET\_LIANG两MARKET\_QIAN钱MARKET\_DAN单AVOIR\_POUND磅AVOIR\_LONG\_TONNE(英制)长吨AVOIR\_SHORT\_TONNE(美制)短吨AVOIR\_OUNCE盎司AVOIR\_DRAM打兰AVOIR\_GRAIN格令AVOIR\_BRI\_CWT英担AVOIR\_BRI\_STONE英石AVOIR\_US\_CWT美担AVOIR\_CARAT克拉TROY\_POUND金衡磅TROY\_OUNCE金衡盎司TROY\_DWT英钱TROY\_GRAIN金衡格令TODO
----

[](#todo)

- 体积和容量换算器

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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 ~1326 days

Total

2

Last Release

929d ago

### Community

Maintainers

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

---

Tags

phpqualityunitunitconvertconverter

### Embed Badge

![Health badge](/badges/alonexy-converters/health.svg)

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

###  Alternatives

[mark-gerarts/auto-mapper-plus

An AutoMapper for PHP

5623.5M23](/packages/mark-gerarts-auto-mapper-plus)[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k550.9k](/packages/iamcal-php-emoji)[matthiasmullie/path-converter

Relative path converter

10632.1M9](/packages/matthiasmullie-path-converter)[ncjoes/office-converter

PHP Wrapper for LibreOffice

2501.4M4](/packages/ncjoes-office-converter)[henck/rtf-to-html

RTF to HTML converter in PHP

108868.1k1](/packages/henck-rtf-to-html)[magyarandras/amp-converter

A library to convert HTML articles, blog posts or similar content to AMP (Accelerated Mobile Pages).

65155.7k](/packages/magyarandras-amp-converter)

PHPackages © 2026

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