PHPackages                             itsnubix/emoji - 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. itsnubix/emoji

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

itsnubix/emoji
==============

A PHP Library for interacting with Emojis

v0.0.0(3y ago)112MITPHPPHP ^8.1

Since Jun 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/itsnubix/emoji)[ Packagist](https://packagist.org/packages/itsnubix/emoji)[ RSS](/packages/itsnubix-emoji/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Emoji
=====

[](#emoji)

Adds support for inserting and converting emojis into unicode in PHP. Uses enums and so requires PHP8.1 or higher.

Installation
------------

[](#installation)

`composer require itsnubix/emoji`

Usage
-----

[](#usage)

Below you will find some usage examples.

```
use Emoji\Emoji;
use Emoji\SkinTone;

// Globally set skin tone for all applicable emojis
Emoji::setDefaultSkinTone(SkinTone::medium);

// Various methods for spitting out a unicode emoji
Emoji::get('grinning_face')->toString(); // returns 😀
(string) Emoji::grinning_face(); // returns 😀
echo Emoji::grinningFace(); // returns 😀

// Overwrite the default skin tone on the fly
Emoji::get('waving_hand', SkinTone::light)->toString(); // returns 👋🏻
Emoji::wavingHand()->light()->toString(); // returns 👋🏻
Emoji::wavingHand()->skinTone('light')->toString(); // returns 👋🏻

// Also supports dynamic skin tone selection with a callback
$user = new User(['preferred_skin_tone' => SkinTone::light])
Emoji::wavingHand()
  ->skinTone(fn() => $user->preferred_skin_tone)
  ->toString();

// You may also remove tone from a given emoji as well.
$emoji = Emoji::wavingHand(SkinTone::medium);
$emoji->skinTone(); // get the skin tone, returns SkinTone::medium
$emoji->toneless()->skinTone(); // returns null

// Finally, you may replace emojis in a string where they match within
// two colons and align to an allowed emoji character. If invalid characters
// are used it just returns them without converting
Emoji::parse('Hello world :waving_hand: how are you :invalid_character:'); // returns "Hello world 👋" how are you :invalid_character:"

// You can set the skin tone for the parser globally with...
Emoji::setDefaultSkinTone(Emoji::light);
Emoji::parse('Hello world :waving_hand:'); // returns "Hello world 👋🏻"
```

For a full list of supported emojis and those that support adding skin tones view: [Character](/src/Enums/Character.php)

For a full list of skin tones view: [SkinTone](/src/Enums/SkinTone.php)

Todo
----

[](#todo)

- Allow a user to select emojis
- Allow a user to set skin tones
- Add support for all emoji skin tones
- Add support for changing skin tone when replacing a string

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

1426d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15757117?v=4)[Kyle Milloy](/maintainers/kylemilloy)[@kylemilloy](https://github.com/kylemilloy)

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/itsnubix-emoji/health.svg)

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

PHPackages © 2026

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