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

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

hidehalo/emoji
==============

filtes emoji symbols for you

1.0.1(8y ago)31154.7k↑35.3%2MITPHP

Since Sep 30Pushed 4y ago3 watchersCompare

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

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

Emoji
=====

[](#emoji)

[![Build Status](https://camo.githubusercontent.com/6e73fae483f97e9e2361aabf2f114abd3519767fb08f71244f5ebc854e780d89/68747470733a2f2f7472617669732d63692e6f72672f6869646568616c6f2f656d6f6a692e737667)](https://travis-ci.org/hidehalo/emoji)[![FOSSA Status](https://camo.githubusercontent.com/b7d7c44015a84403af1e9ebc734ed329ac9ed8be04b02752faddd2773ea67ac2/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466869646568616c6f253246656d6f6a692e7376673f747970653d736869656c64)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhidehalo%2Femoji?ref=badge_shield)

If you want help with parse and store emoji symbol characters,you could think about use this library :)

Features
--------

[](#features)

1. Detected emoji symbols only
2. Replace emoji symbols to other texts and turn it back
3. Zero dependence
4. Lightweight and fast

Install
-------

[](#install)

```
$composer require hidehalo/emoji
```

Usage
-----

[](#usage)

### Parser

[](#parser)

```
require vendor/autoload.php;
use Hidehalo\Emoji\Parser;

$parser = new Parser();
$parser->parse($contents);
```

### Converter

[](#converter)

```
# if you want to replace those emoji symbols to ohter marked texts
# and has ability to turn those back,
# it has a built-in Protocol and Converter could do this
# and $decoded will equals $raw,it is real very simple

use Hidehalo\Emoji\Converter;

$converter = new Converter($parser);
$encoded = $converter->encode($raw);
$decoded = $converter->decode($encoded);

# filter emojis
use Hidehalo\Emoji\Protocol\Filter;

$clean = $converter->encode($raw, new Filter);
```

### Custom protocol

[](#custom-protocol)

Maybe you want to impl your custom convert protocol,you can make it through implements [ProtocolInterface](src/Protocol/ProtocolInterface.php)

```
use Hidehalo\Emoji\Protocol\ProtocolInterface as Protocol;
use Hidehalo\Emoji\Protocol\PatternAwareTrait;

class CustomProto implments Protocol
{
    use PatternAwareTrait;

    protected $format = "FORMAT";
    protected $pattern = "/FORMAT/";

    public function encode($contents)
    {
        //your impls
    }

    public function decode($contents)
    {
        //your impls
    }
}
$customProto = new CustomProto;
$customEncoded = $converter->encode($raw, $customProto);
$customDecoded = $converter->decode($customDecoded, $customProto);
```

Testing
-------

[](#testing)

```
$./vendor/bin/phpunit
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[![FOSSA Status](https://camo.githubusercontent.com/0dfe84c49588dae794d0aafbe2d7b4d8c78ae8654d0946dd50b10ef8717c7f38/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466869646568616c6f253246656d6f6a692e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fhidehalo%2Femoji?ref=badge_large)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.9% 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 ~76 days

Total

8

Last Release

2985d ago

Major Versions

0.1.4 → v1.0.x-dev2018-03-11

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6302952?v=4)[\_\_hidehalo](/maintainers/hidehalo)[@hidehalo](https://github.com/hidehalo)

---

Top Contributors

[![hidehalo](https://avatars.githubusercontent.com/u/6302952?v=4)](https://github.com/hidehalo "hidehalo (87 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

composer-packageemojiemoji-filteremoji-parseremoji-symbolsfastlightweightphpzero-dependency

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[opensrs/osrs-toolkit-php

OpenSRS PHP Toolkit

7668.6k](/packages/opensrs-osrs-toolkit-php)[magiccart/lookbook

Pin product to banner easy.

1319.7k](/packages/magiccart-lookbook)[dem13n/discussion-cards

Output of discussions in form of cards

164.6k](/packages/dem13n-discussion-cards)[tureki/phpcc

A PHP Library to use Google Closure Compiler compress Javascript

202.7k](/packages/tureki-phpcc)

PHPackages © 2026

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