In PHP, you can display emoji characters just by typing them:
echo "😃";
This package provides some functionality to work with emojis if your IDE or used font can't render them correctly:
Emoji::grinningFace();
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
The best postcards will get published on the open source page on our website.
You can install the package via composer:
composer require spatie/emoji
The Spatie\Emoji\Emoji
-class contains character constants that may be used directly:
Emoji::CHARACTER_GRINNING_FACE;
Or you can use the shorter method by leaving off "character" and using camelCase:
Emoji::grinningFace();
You can also use an ISO 3166 Alpha2 country code and get the appropriate flag for the country:
Emoji::countryFlag('be'); // 🇧🇪
This package contains Full Emoji List v12.0 based on https://unicode.org/Public/emoji/12.0/emoji-test.txt all methods and constants are auto-generated.
Please see CHANGELOG for more information what has changed recently.
$ composer test
We are accepting PRs that add characters to the class. Please use this list to look up the unicode value and the name of the character.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
The MIT License (MIT). Please see License File for more information.