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

ActiveLibrary

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 1mo ago

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 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

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

875d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e92403f9a32928e6adda6d8c9bc2d710f4e9e280e39d6e000a24a9b700a7426?d=identicon)[alonexy](/maintainers/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.2M21](/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.3k481.1k](/packages/iamcal-php-emoji)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M37](/packages/goetas-webservices-xsd2php)[ncjoes/office-converter

PHP Wrapper for LibreOffice

2431.2M4](/packages/ncjoes-office-converter)[pixel418/markdownify

The HTML to Markdown converter for PHP

196800.8k8](/packages/pixel418-markdownify)

PHPackages © 2026

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