PHPackages                             photogabble/php-confusable-homoglyphs - 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. photogabble/php-confusable-homoglyphs

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

photogabble/php-confusable-homoglyphs
=====================================

PHP port of the Python library confusable\_homoglyphs

2.0.0(1y ago)3354.2k↓39.9%4[1 issues](https://github.com/photogabble/php-confusable-homoglyphs/issues)2MITPHPPHP &gt;=7.3CI passing

Since Feb 13Pushed 1y ago3 watchersCompare

[ Source](https://github.com/photogabble/php-confusable-homoglyphs)[ Packagist](https://packagist.org/packages/photogabble/php-confusable-homoglyphs)[ RSS](/packages/photogabble-php-confusable-homoglyphs/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (2)

Confusable Homoglyphs
=====================

[](#confusable-homoglyphs)

*A PHP port of [vhf/confusable\_homoglyphs](https://github.com/vhf/confusable_homoglyphs)*

 [![Build Status](https://github.com/photogabble/php-confusable-homoglyphs/actions/workflows/phpunit.yml/badge.svg)](https://github.com/photogabble/php-confusable-homoglyphs/actions/workflows/phpunit.yml) [![Latest Stable Version](https://camo.githubusercontent.com/475ee7f6d108761ea095fa0995f973fddc8da580304362cc6a038247198545ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686f746f676162626c652f7068702d636f6e66757361626c652d686f6d6f676c797068732e737667)](https://packagist.org/packages/photogabble/php-confusable-homoglyphs) [![License](https://camo.githubusercontent.com/503a2c6da8380d0d62b100379df2058a5fbc4745535ee75f892017e66ed3bc72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686f746f676162626c652f7068702d636f6e66757361626c652d686f6d6f676c797068732e737667)](LICENSE)

About this package
------------------

[](#about-this-package)

> Unicode homoglyphs can be a nuisance on the web. Your most popular client, AlaskaJazz, might be upset to be impersonated by a trickster who deliberately chose the username ΑlaskaJazz. (The A is the greek letter [capital alpha](http://www.amp-what.com/unicode/search/%CE%91))

This is a complete port of the Python library [vhf/confusable\_homoglyphs](https://github.com/vhf/confusable_homoglyphs) to PHP. I found myself needing its functionality after reading [this article](https://www.b-list.org/weblog/2018/feb/11/usernames/) by James Bennett on validating usernames and how [django-registration](https://github.com/ubernostrum/django-registration/blob/1d7d0f01a24b916977016c1d66823a5e4a33f2a0/registration/validators.py) does so.

A huge thank you goes to the Python package creator [Victor Felder](https://github.com/vhf) and its contributors [Ryan Kilby](https://github.com/rpkilby) and [muusik](https://github.com/muusik); without their work this port would not exist.

This library is compatible with PHP versions 7.3 and above.

Install
-------

[](#install)

Install this library with composer: `composer require photogabble/php-confusable-homoglyphs`.

Usage
-----

[](#usage)

Please see the [tests](https://github.com/photogabble/php-confusable-homoglyphs/tree/master/tests) for detailed example of usage.

#### Known Usage

[](#known-usage)

- [Laravel Registration Validator package ](https://github.com/photogabble/laravel-registration-validator)
- If you use this package in your open source project please create a pull request to add a link here

Is the data up to date?
-----------------------

[](#is-the-data-up-to-date)

This project currently ships with unicode consortium public data version 16.0.0.

The unicode blocks aliases and names for each character are extracted from [this file](http://www.unicode.org/Public/UNIDATA/Scripts.txt) provided by the unicode consortium.

The matrix of which character can be confused with which other characters is built using [this file](http://www.unicode.org/Public/security/latest/confusables.txt) provided by the unicode consortium.

The version this project currently ships with was generated on the 1st May 2025.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance44

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 97.1% 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 ~526 days

Recently: every ~658 days

Total

6

Last Release

429d ago

Major Versions

1.1.1 → 2.0.02025-05-01

PHP version history (2 changes)1.0.0PHP &gt;=7.0.0

2.0.0PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/464699?v=4)[Simon Dann](/maintainers/carbontwelve)[@carbontwelve](https://github.com/carbontwelve)

---

Top Contributors

[![carbontwelve](https://avatars.githubusercontent.com/u/464699?v=4)](https://github.com/carbontwelve "carbontwelve (68 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (2 commits)")

---

Tags

confusablehomoglyphslibraryphpphp7stringunicodeunicode-charactersunicode-public-dataunicodeconfusablehomoglyphs

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/photogabble-php-confusable-homoglyphs/health.svg)

```
[![Health](https://phpackages.com/badges/photogabble-php-confusable-homoglyphs/health.svg)](https://phpackages.com/packages/photogabble-php-confusable-homoglyphs)
```

###  Alternatives

[symfony/dom-crawler

Eases DOM navigation for HTML and XML documents

4.1k399.9M2.6k](/packages/symfony-dom-crawler)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[symfony/filesystem

Provides basic utilities for the filesystem

4.6k710.3M4.0k](/packages/symfony-filesystem)[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.9k](/packages/symfony-console)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/http-foundation

Defines an object-oriented layer for the HTTP specification

8.7k929.1M6.5k](/packages/symfony-http-foundation)

PHPackages © 2026

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