maymeow/php-fluentui-emoji

There is no license information available for the latest version (dev-main) of this package.

dev-main 2023-05-21 13:13 UTC

This package is auto-updated.

Last update: 2024-10-21 16:02:50 UTC


README

Library to use FluentUI Emojis with PHP application

composer require maymeow/php-fluentui-emoji

Copy src/Emojis.json somewhere to your application. You will also need to put soewhere assets folder from https://github.com/microsoft/fluentui-emoji

How to use

$text = 'Hello World! ๐Ÿ’œ๐Ÿ˜๐Ÿฅš๐Ÿฅณ๐Ÿนโ“๐Ÿ›ซโฒ๐Ÿคทโ€โ™€๏ธ๐Ÿ‘ทโ€โ™€๏ธ๐Ÿ‘ทโ€โ™€๏ธ๐Ÿ”๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘จโ€๐Ÿฆฑ๐Ÿ‘ฑโ€โ™€๏ธ๐Ÿ‘ฉโ€๐Ÿฆณ๐ŸŽ…๐Ÿ‘ฎโ€โ™€๏ธ๐Ÿšž๐Ÿš…๐Ÿš๐Ÿญ๐Ÿช‘โ˜ฎ๐Ÿ•‰๐Ÿ’ฅ๐Ÿ’ข';

$fluentEmojis = Emojis::init(SRC . '/Emojis.json');

file_put_contents('test.html', $fluentEmojis->replace($text));