PHPackages                             owenvoke/convert - 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. owenvoke/convert

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

owenvoke/convert
================

A package for converting data.

v1.0.0(5y ago)010MITPHPPHP ^7.3 || ^8.0

Since Jan 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/owenvoke/convert)[ Packagist](https://packagist.org/packages/owenvoke/convert)[ Fund](https://ecologi.com/owenvoke?gift-trees)[ GitHub Sponsors](https://github.com/owenvoke)[ RSS](/packages/owenvoke-convert/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Convert
=======

[](#convert)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d0cdc98eea3fb6ead988867779a72fec7403ec7e8dd4dbccf1b646a65d367434/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f77656e766f6b652f636f6e766572742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/owenvoke/convert)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/63ff02d3ec94ea180254c2e9c70a9d896906b5cfb3579bd5a33a648b31a031ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6f77656e766f6b652f636f6e766572742f54657374732e7376673f7374796c653d666c61742d737175617265)](https://github.com/owenvoke/convert/actions)[![Style CI](https://camo.githubusercontent.com/85fe8742f68cafb86cecf5cb37f5961a25d53c0d9ed6eb652717744de278535f/68747470733a2f2f7374796c6563692e696f2f7265706f732f3233333833323631352f736869656c64)](https://styleci.io/repos/233832615)[![Total Downloads](https://camo.githubusercontent.com/81a754ed940096f63c6d0a2cac7b4b427a4e2fbb7c51db79b5da152039a1a487/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f77656e766f6b652f636f6e766572742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/owenvoke/convert)[![Buy us a tree](https://camo.githubusercontent.com/910e097fe46a40add8f3484705ecbc26dc047df84b2fef027405f47408023d76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e3f7374796c653d666c61742d737175617265)](https://ecologi.com/owenvoke?gift-trees)

A package for converting data.

Install
-------

[](#install)

Via Composer

```
$ composer require owenvoke/convert
```

Usage
-----

[](#usage)

#### Byte Conversion

[](#byte-conversion)

**Convert from a string to bytes**

```
use OwenVoke\Convert\Bytes;

// Metric standard format
Bytes::toInt('1B');
// IEC standard format
Bytes::toInt('1GiB');
```

**Convert from bytes to a human-readable string**

```
use OwenVoke\Convert\Bytes;

// This is always formatted as metric in the output
Bytes::toString(1000);
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Owen Voke](https://github.com/owenvoke)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Treeware
--------

[](#treeware)

You're free to use this package, but if it makes it to your production environment you are required to buy the world a tree.

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you support this package and contribute to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

You can buy trees [here](https://ecologi.com/owenvoke?gift-trees).

Read more about Treeware at [treeware.earth](https://treeware.earth).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

2002d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1899334?v=4)[Owen Voke](/maintainers/owenvoke)[@owenvoke](https://github.com/owenvoke)

---

Top Contributors

[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (18 commits)")

---

Tags

conversionphp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/owenvoke-convert/health.svg)

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

###  Alternatives

[ladamalina/yii2-smsc

Smsc.ru wrapper for Yii 2

1115.3k](/packages/ladamalina-yii2-smsc)

PHPackages © 2026

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