PHPackages                             axy/binary - 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. axy/binary

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

axy/binary
==========

Working with binary strings

0.2.0(3y ago)027.7k↓41%12MITPHPPHP &gt;=8.1

Since Dec 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/axypro/binary)[ Packagist](https://packagist.org/packages/axy/binary)[ Docs](https://github.com/axypro/binary)[ RSS](/packages/axy-binary/feed)WikiDiscussions master Synced 1mo ago

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

axy\\binary
===========

[](#axybinary)

Working with binary strings in PHP. At the moment this package doesn't make much sense. Used by some other packages.

[![Latest Stable Version](https://camo.githubusercontent.com/414cfffda6236d3979eadf5ac8a413c66799a36b7fcfd678956d681de4169245/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6178792f62696e6172792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/axy/binary)[![Minimum PHP Version](https://camo.githubusercontent.com/2d18ce514c7016022dad012ac9e39a8b6f47cc411b2daff6627cbf208f8cea63/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e312d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Tests](https://github.com/axypro/binary/actions/workflows/test.yml/badge.svg)](https://github.com/axypro/binary/actions/workflows/test.yml)[![Coverage Status](https://camo.githubusercontent.com/08257459a8ab849b448f69d3e212187d091400b5a1974183dd7a551a61fa3baf/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f61787970726f2f62696e6172792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/axypro/binary?branch=master)[![License](https://camo.githubusercontent.com/44b19d3bf7d1ce1413ec14c3b56f42776100e98b86304435cf927a7fa7ec1df0/68747470733a2f2f706f7365722e707567782e6f72672f6178792f7062696e6172792f6c6963656e7365)](LICENSE)

### Documentation

[](#documentation)

Native string functions allow to work with text strings as with binary (a char is a byte). The problem is that these functions can be overridden from mbstring.

The library uses mbstring functions with the charset `8bit`. And native functions if mbstring is not enabled.

#### `Binary`

[](#binary)

Class `axy\binary\Binary` with static methods.

- `getLength(string $string): int`
- `getSlice(string $string, int $offset [, int $length]): string`
- `getByteFromChar(string $char [, bool $signed = FALSE]): int`
- `getByteFromString(string $string, int $index [, bool $signed = FALSE]): int`
- `unpackBytes(string $string [, bool $signed = false]): int[]`

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

2

Last Release

1159d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.4.0

0.2.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![vasa-c](https://avatars.githubusercontent.com/u/557081?v=4)](https://github.com/vasa-c "vasa-c (15 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/axy-binary/health.svg)

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

PHPackages © 2026

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