PHPackages                             juancamunoz/country-code-to-emoji-flags - 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. juancamunoz/country-code-to-emoji-flags

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

juancamunoz/country-code-to-emoji-flags
=======================================

Converts string of country codes into string of emoji flags.

1.0(4y ago)063Apache-2.0PHPPHP &gt;=5.3.0

Since Apr 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/juancamunoz/country-code-to-emoji-flags)[ Packagist](https://packagist.org/packages/juancamunoz/country-code-to-emoji-flags)[ Docs](https://github.com/juancamunoz/country-code-to-emoji-flags)[ RSS](/packages/juancamunoz-country-code-to-emoji-flags/feed)WikiDiscussions main Synced 2d ago

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

Country Code 🔡 ➡️ Emoji Flag 🇬🇧
===============================

[](#country-code--️-emoji-flag-)

[![Download per Month](https://camo.githubusercontent.com/1ce5e69b74ff897d404ce236b54e819641282295abf6061de5cce3a86317fa65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f70657465726b61686c2f636f756e7472792d636f64652d746f2d656d6f6a692d666c61672e737667)](https://packagist.org/packages/peterkahl/country-code-to-emoji-flag)[![License](https://camo.githubusercontent.com/55252c8bdb8cce91195de72acc8ada6436f3ce1971d3e113bf281cf411acbfd7/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6170616368652d626c75652e737667)](http://www.apache.org/licenses/LICENSE-2.0.html)

Converts a country code to emoji flag. Most flags use a 2-letter code, but some use more (eg England=gbeng, Scotland=gbsct, Wales=gbwls, etc).

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!

```
use juancamunoz\flagEmoji\flagEmoji;

echo flagEmoji::convert('uk');    # 🇬🇧
echo flagEmoji::convert('gbwls'); # 🏴󠁧󠁢󠁷󠁬󠁳󠁿
echo flagEmoji::convert('gbsct'); # 🏴󠁧󠁢󠁳󠁣󠁴󠁿
echo flagEmoji::convert('gbeng'); # 🏴󠁧󠁢󠁥󠁮󠁧󠁿
```

country-code-to-emoji-flags
===========================

[](#country-code-to-emoji-flags)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

1491d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1285841b31835f9616cc8b7cf2b1223f4614ab7e01f7c8cad5dd578b275e2e5a?d=identicon)[juancamunoz](/maintainers/juancamunoz)

---

Top Contributors

[![juancamunoz](https://avatars.githubusercontent.com/u/43283934?v=4)](https://github.com/juancamunoz "juancamunoz (2 commits)")

---

Tags

flagcountryemoji

### Embed Badge

![Health badge](/badges/juancamunoz-country-code-to-emoji-flags/health.svg)

```
[![Health](https://phpackages.com/badges/juancamunoz-country-code-to-emoji-flags/health.svg)](https://phpackages.com/packages/juancamunoz-country-code-to-emoji-flags)
```

###  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.4M48](/packages/rinvex-countries)[components/flag-icon-css

A curated collection of all country flags in SVG — plus the CSS for easier integration.

12.0k1.6M23](/packages/components-flag-icon-css)[stidges/country-flags

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

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

A Laravel wrapper for the stidges/country-flags package

28134.6k](/packages/stidges-laravel-country-flags)[spatie/emoji

Display emoji characters

4671.2M32](/packages/spatie-emoji)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)

PHPackages © 2026

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