PHPackages                             8ctopus/unsigned-int - 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. 8ctopus/unsigned-int

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

8ctopus/unsigned-int
====================

Convert signed integers to unsigned

1.0.3(5mo ago)222MITPHPPHP &gt;=8.0CI passing

Since Jul 14Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/8ctopus/unsigned-int)[ Packagist](https://packagist.org/packages/8ctopus/unsigned-int)[ Docs](https://github.com/8ctopus/unsigned-int)[ RSS](/packages/8ctopus-unsigned-int/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

Unsigned int
============

[](#unsigned-int)

[![packagist](https://camo.githubusercontent.com/6e08e80e7d3fd74fa6043661d2302e1a40001757a53f4bab0a5ab4e9232f6202/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f756e7369676e65642d696e742f76)](https://packagist.org/packages/8ctopus/unsigned-int)[![downloads](https://camo.githubusercontent.com/57225d910ade9a49d83be4e100d74326a6380e8524850d72d397f123af45a25b/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f756e7369676e65642d696e742f646f776e6c6f616473)](https://packagist.org/packages/8ctopus/unsigned-int)[![min php version](https://camo.githubusercontent.com/b5bbd83bc06cd66ad59ba3563f6717b018badbe1bf947555c7c46b763ff33e5a/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f756e7369676e65642d696e742f726571756972652f706870)](https://packagist.org/packages/8ctopus/unsigned-int)[![license](https://camo.githubusercontent.com/605b947c99c38a3ad40be8493a8ff48a6c368524da630b80d5be62f3c9e78984/68747470733a2f2f706f7365722e707567782e6f72672f3863746f7075732f756e7369676e65642d696e742f6c6963656e7365)](https://packagist.org/packages/8ctopus/unsigned-int)[![tests](https://github.com/8ctopus/unsigned-int/actions/workflows/tests.yml/badge.svg)](https://github.com/8ctopus/unsigned-int/actions/workflows/tests.yml)[![code coverage badge](https://raw.githubusercontent.com/8ctopus/unsigned-int/image-data/coverage.svg)](https://raw.githubusercontent.com/8ctopus/unsigned-int/image-data/coverage.svg)[![lines of code](https://raw.githubusercontent.com/8ctopus/unsigned-int/image-data/lines.svg)](https://raw.githubusercontent.com/8ctopus/unsigned-int/image-data/lines.svg)

A php library to convert signed integers to unsigned int.

php does not implement unsigned integers natively which can cause some headaches when unsigned are required. This library hopes to make your life a lot easier.

install and demo
----------------

[](#install-and-demo)

```
composer require 8ctopus/unsigned-int

```

```
use Oct8pus\Unsigned\UInt8;
use Oct8pus\Unsigned\UInt16;
use Oct8pus\Unsigned\UInt32;

require_once './vendor/autoload.php';

echo "convert signed int 8 to unsigned int 8\n";
echo (new UInt8(127));
echo (new UInt8(-128));

$uint8 = new UInt8();
$uint8->toUnsigned(127);
```

```
convert signed int 8 to unsigned int 8
        127 > 0x7F (127)
       -128 > 0x80 (128)
```

tests
-----

[](#tests)

```
composer test

```

clean code
----------

[](#clean-code)

```
composer fix(-risky)

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance70

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~410 days

Total

4

Last Release

171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4dafd5f7ef8134a5c9b231686c5da3d6416db09139b45aac0b26952178dffb8a?d=identicon)[8ctopus](/maintainers/8ctopus)

---

Top Contributors

[![8ctopus](https://avatars.githubusercontent.com/u/13252042?v=4)](https://github.com/8ctopus "8ctopus (46 commits)")

---

Tags

integerunsignedunsigned int

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/8ctopus-unsigned-int/health.svg)

```
[![Health](https://phpackages.com/badges/8ctopus-unsigned-int/health.svg)](https://phpackages.com/packages/8ctopus-unsigned-int)
```

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M277](/packages/brick-math)[skleeschulte/base32

Base32 encoding and decoding class (RFC 4648, RFC 4648 extended hex, Crockford, z-base-32/Zooko).

17314.5k9](/packages/skleeschulte-base32)[aza/math

AzaMath - Anizoptera CMF mathematic component. Arbitrary precision arithmetic (for huge integers; BCMath wrapper) and universal convertor between positional numeral systems (supported bases from 2 to 62 inclusive, and systems with custom alphabet; pure PHP realisation, can use GMP and core PHP functions for speed optimization).

1921.9k1](/packages/aza-math)[phpmath/biginteger

A PHP library to work with big integers.

235.8k1](/packages/phpmath-biginteger)[danog/phpstruct

PHP implementation of python's struct module.

1110.1k](/packages/danog-phpstruct)

PHPackages © 2026

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