PHPackages                             syrian-lucianos/base16-php - 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. syrian-lucianos/base16-php

ActiveLibrary

syrian-lucianos/base16-php
==========================

Encoding And Decoding Text Using Only 16 Characters

v0.1.0(6y ago)011PHPPHP &gt;=5.0.0

Since Aug 16Pushed 6y ago2 watchersCompare

[ Source](https://github.com/Eyad-Bereh/Base16-PHP)[ Packagist](https://packagist.org/packages/syrian-lucianos/base16-php)[ RSS](/packages/syrian-lucianos-base16-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Base16-PHP
==========

[](#base16-php)

Encoding And Decoding Text Using Only 16 Characters

Installation
============

[](#installation)

First make sure you have `composer` installed on your device.

From your terminal, navigate to your project folder and run this command:

`composer require syrian-lucianos/base16-php`

And that's all!

Usage
=====

[](#usage)

The library supports two flavors of programming paradigms:

- Procedural Programming
- Object Oriented Programming

Procedural Programming
----------------------

[](#procedural-programming)

Use the `base16_encode()` and `base16_decode()` functions to respectively encode and decode your text content.

For example:

```
$text = "Hello World!, This is a test.";
$encoded = base16_encode($text);
echo $encoded . PHP_EOL;  // Output "48656c6c6f20576f726c64212c2054686973206973206120746573742e"
$decoded = base16_decode($encoded);
echo $decoded . PHP_EOL;  // Output "Hello World!, This is a test."

```

Object Oriented Programming
---------------------------

[](#object-oriented-programming)

The object oriented version of the library provides `Base16` class alongside its static `Encode()` and `Decode()` methods to respectively encode and decode your text content as follows:

```
$text = "Hello World!, This is a test.";
$encoded = Base16::Encode($text);
echo $encoded . PHP_EOL;  // Output "48656c6c6f20576f726c64212c2054686973206973206120746573742e"
$decoded = Base16::Decode($encoded);
echo $decoded . PHP_EOL;  // Output "Hello World!, This is a test."

```

More info
=========

[](#more-info)

This algorithm replace each ASCII character with two ASCII characters, therefore there's a double overhead.

In a mathematical language, if the text is `n` bytes in size (or length, doesn't matter because we're using ASCII), then the resultant text will be `2*n` bytes in size, this implies a `100%` increment in size (overhead), unlike Base64 which has approximately `33.333333%` overhead.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

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

2462d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0583b5df49b0674e17690be17812fce448017bea74ca5c5fd0a476ec891b35b?d=identicon)[Eyad Mohammed Osama](/maintainers/Eyad%20Mohammed%20Osama)

---

Top Contributors

[![Eyad-Bereh](https://avatars.githubusercontent.com/u/9156333?v=4)](https://github.com/Eyad-Bereh "Eyad-Bereh (6 commits)")

### Embed Badge

![Health badge](/badges/syrian-lucianos-base16-php/health.svg)

```
[![Health](https://phpackages.com/badges/syrian-lucianos-base16-php/health.svg)](https://phpackages.com/packages/syrian-lucianos-base16-php)
```

PHPackages © 2026

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