PHPackages                             miniaturebase/runes - 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. [Security](/categories/security)
4. /
5. miniaturebase/runes

ActiveLibrary[Security](/categories/security)

miniaturebase/runes
===================

A low-level string character analysis library for PHP.

v0.1.1(5y ago)022[1 PRs](https://github.com/minibase-app/runes/pulls)MITPHPPHP &gt;=7.1 || &gt;=8.0CI failing

Since Feb 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/minibase-app/runes)[ Packagist](https://packagist.org/packages/miniaturebase/runes)[ RSS](/packages/miniaturebase-runes/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

 [![PHP Runes](./logo.png)](./logo.png)

[![Latest Stable Version](https://camo.githubusercontent.com/d17af719ac51a4669dfecb9ece18fcd7a4023ccf84911430be8e29e89392b68a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f7264616e6272617565722f72756e65733f636f6c6f723d323537656332266c6162656c3d737461626c65267374796c653d666c61742d737175617265)](https://packagist.org/packages/jordanbrauer/runes)[![Latest Unstable Version](https://camo.githubusercontent.com/0372110d736e5e048fefdd75c4f445f096c9c93984caac049856a9acf113adb7/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7264616e6272617565722f72756e65732f762f756e737461626c653f666f726d61743d666c61742d737175617265)](//packagist.org/packages/jordanbrauer/runes)[![PHP from Packagist](https://camo.githubusercontent.com/486c30e693fe8464426e2d6f2136cd5e750d7cb70617fee3ed957ebb20d6920b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a6f7264616e6272617565722f72756e65733f636f6c6f723d383839326265267374796c653d666c61742d737175617265)](https://secure.php.net/releases/)[![composer.lock available](https://camo.githubusercontent.com/2ab92603db298a6be0d6ce2ddf5537f5863147de3453c89cbb4e73c8d22e2785/68747470733a2f2f706f7365722e707567782e6f72672f6a6f7264616e6272617565722f72756e65732f636f6d706f7365726c6f636b3f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/jordanbrauer/runes)[![license](https://camo.githubusercontent.com/c289cf30a70898e39bbba6d1a45665b67ff134dbe4ac0ebbf91f50d4dece9c87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f7264616e6272617565722f72756e65732e7376673f7374796c653d666c61742d737175617265)](https://github.com/jordanbrauer/runes/blob/master/LICENSE)

[![CI Workflow](https://camo.githubusercontent.com/0290fbb9c61db512193a15f3ed5285711ccfba14230440c359ab98d0efd5b966/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6f7264616e6272617565722f72756e65732f43493f7374796c653d666c61742d737175617265266c6162656c3d7465737473)](https://github.com/jordanbrauer/runes/actions?query=workflow%3ACI)[![Maintenance](https://camo.githubusercontent.com/159b2aff0e6eb32b0bbe88a8e4b7e44bf24b5325eb3100aa76c5ddaa36bde2db/68747470733a2f2f696d672e736869656c64732e696f2f6d61696e74656e616e63652f7965732f323032312e7376673f7374796c653d666c61742d737175617265)](https://github.com/jordanbrauer/runes)[![Packagist](https://camo.githubusercontent.com/6326a180318cd5a09ac63ed5b4e138eb06a4fbc774f083326747c36e7b54c03b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f7264616e6272617565722f72756e65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jordanbrauer/runes)

Runes
=====

[](#runes)

A low-level string character analysis library for PHP.

See [compart unicode documentation](https://www.compart.com/en/unicode/) for useful information about unicode characters that PHP does not handle yet.

**Features:**

- Per-character (multi-byte aware) analysis;
- Script detection, differentiating look-a-like characters (see [IDN homograph attack](https://en.wikipedia.org/wiki/IDN_homograph_attack));
- Character encoding detection &amp; conversion;
- Various serialization formats;

Setup
-----

[](#setup)

Instructions on how to set this repository up for use in your own project, or as a develper contributing to this one.

### Requirements

[](#requirements)

There are not many requirements for this library. All of them are host machine related.

- PHP `>= 7.1`;
- PHP [Intl extension](https://www.php.net/manual/en/book.intl.php);
- [libicu](http://site.icu-project.org/);

### Installation

[](#installation)

Use composer and your autoloader.

```
composer require jordanbrauer/runes
```

**For Contributors:**

Clone the repository and install the development tools to begin running tests for your features &amp; bug fixes.

```
git clone https://github.com/jordanbrauer/runes.git \
  && cd ./runes \
  && composer install;
```

Usage
-----

[](#usage)

Using the library is super simple. For a quick example, let's analyze the ancient, *yet [strangely familiar](https://en.wikipedia.org/wiki/Bluetooth#Logo)*, `ᛒ` from the [Elder Futhark](https://en.wikipedia.org/wiki/Elder_Futhark) writing system!

```
use Rune\Rune;

$rune = new Rune('ᛒ');

dump($rune->toJson());
```

Would output the following data about the glyph.

```
{
  "bidirectionalClass": "L",
  "binary": "111000011001101110010010",
  "blockCode": 35,
  "bytes": 1,
  "category": "Lo",
  "codepoint": "U+16D2",
  "combiningClass": 0,
  "decimal": 14785426,
  "encoding": "UTF-8",
  "glyph": "ᛒ",
  "hex": "e19b92",
  "isMirrored": false,
  "name": "RUNIC LETTER BERKANAN BEORC BJARKAN B",
  "script": "Runic",
  "utf16": "0x16D2",
  "utf32": "0x000016D2",
  "utf8": "0xE1 0x9B 0x92",
  "version": "3.0.0.0"
}
```

Motivation
----------

[](#motivation)

[Unicode is awesome](https://emojipedia.org/emoji-zwj-sequence/). However, it can be the source of much pain for programmers. This tool aims to help alleviate said pain by providing a low-level/generic API that allows you to focus on the problem without getting bogged down with UTF-8 and it's cousins.

### Project Name

[](#project-name)

Originally, the name of this project was UTFH8; a tongue-in-cheek word-play on the UTF-8 encoding algorithm and the (very strong) English word, *"hate"*, by using the number eight in place of the letters *"a-t-e"*, insinutating that at some point in every developer's career, they will say – *"I hate unicode"*.

Now, the project has been renamed to *Runes*, inspired by [Go's rune type](https://blog.golang.org/strings), and the Elder Futhark – something less harsh &amp; sinister sounding.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/867c1f6d15ff437167c0d7467b16da89095218d52e19716fbf9155497d100615?d=identicon)[jordanbrauer](/maintainers/jordanbrauer)

---

Top Contributors

[![jordanbrauer](https://avatars.githubusercontent.com/u/18744334?v=4)](https://github.com/jordanbrauer "jordanbrauer (40 commits)")

---

Tags

analysisasciiphpsecuritystringunicodeutf-16utf-32utf-8utf-8stringsecurityasciianalysisutf-16utf-32

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/miniaturebase-runes/health.svg)

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

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

8519.6M19](/packages/spatie-laravel-csp)

PHPackages © 2026

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