PHPackages                             m-tymchyk/emoji-flag - 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. m-tymchyk/emoji-flag

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

m-tymchyk/emoji-flag
====================

Library that help convert country ISO codes to emoji flags

v1.0(8y ago)79.0k2MITPHPPHP &gt;=7.0.0

Since Feb 21Pushed 6y ago2 watchersCompare

[ Source](https://github.com/m-tymchyk/emoji-flag)[ Packagist](https://packagist.org/packages/m-tymchyk/emoji-flag)[ Docs](https://github.com/m-tymchyk/emoji-flag)[ RSS](/packages/m-tymchyk-emoji-flag/feed)WikiDiscussions master Synced 3w ago

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

Emoji Flag 🇦🇺🇦🇷🇩🇰🇵🇱🇺🇦🇬🇧🇺🇸🇱🇧
===========================

[](#emoji-flag-)

Converts string of country codes to string of emoji flags. As an argument use a single 2-letter country code or a string of multiple codes.

```
composer require m-tymchyk/emoji-flag
```

```
use EmojiFlag\EmojiFlag;

# Single flag
echo EmojiFlag::emojiFlag('uk'); # 🇬🇧

# String of multiple flags
echo EmojiFlag::emojiFlag('ukcwsxap'); # 🇬🇧🇳🇱🇳🇱🏴
```

Why Emoji
---------

[](#why-emoji)

Emoji symbol is a textual replacement for a graphic image file while having the benefits of a graphic image. The image file is already present at your intended destination (a person's device), so why would you transmit the image to them again and again? -- Use emoji!

Emoji Support
-------------

[](#emoji-support)

Not every platform (hardware + OS) supports emoji. Therefore, use with caution! To my knowledge, iOS, macOS, Android are capable of displaying emoji. Additionally, some platforms may not be able to display certain flags. If unsure, use this as a reference and easy way to test your platform:

Plain Text Is Now 😎 Faux Rich Text
----------------------------------

[](#plain-text-is-now--faux-rich-text)

Now you can include emoji in plain text files, even in plain text emails, making them sharp, colourful and rich looking. You can put emoji flags into your database too!

♻ Green Technology ♻
--------------------

[](#-green-technology-)

An image file equivalent to an emoji symbol may be tens, hundreds of kilobytes in size, while an emoji symbol is only several bytes. That's a bandwidth saving of around 10,000 times. If you use emoji instead of image files, you reduce your carbon footprint.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

3047d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a98773416da7f7a14080e4ea0d342cb367b22176ac485cfd0411d6d96377586e?d=identicon)[Reilag](/maintainers/Reilag)

---

Top Contributors

[![m-tymchyk](https://avatars.githubusercontent.com/u/7893507?v=4)](https://github.com/m-tymchyk "m-tymchyk (4 commits)")

---

Tags

composercounteremojiflagconverterflagcountryemoji

### Embed Badge

![Health badge](/badges/m-tymchyk-emoji-flag/health.svg)

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

###  Alternatives

[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.8M58](/packages/rinvex-countries)[iamcal/php-emoji

This is a PHP library for dealing with Emoji, allowing you to convert between various native formats and displaying them using HTML.

1.3k528.3k](/packages/iamcal-php-emoji)[stidges/country-flags

A small package to convert a country code to the corresponding country flag emoji

29267.7k4](/packages/stidges-country-flags)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28140.0k](/packages/stidges-laravel-country-flags)[matthiasmullie/path-converter

Relative path converter

10231.2M8](/packages/matthiasmullie-path-converter)[kartik-v/yii2-ipinfo

An IP address information display widget for Yii 2.0 with country flag and geo position info.

2733.3k1](/packages/kartik-v-yii2-ipinfo)

PHPackages © 2026

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