Library to parse emoji-test.txt
(emoji-test.txt
file provides data for testing which emoji forms should be in keyboards and which should also be displayed/processed).
composer require sunaoka/emoji-parser
<?php
use Sunaoka\EmojiParser\EmojiParser;
$emojiParser = new EmojiParser('emoji-test.txt');
$data = $emojiParser->parse();
print_r($data);
output is ...
(
[date] => 2020-01-21, 13:40:25 GMT
[version] => 13.0
[url] => https://unicode.org/Public/emoji/13.0/emoji-test.txt
[emoji] => Array
(
[0] => Array
(
[group] => Smileys & Emotion
[subgroup] => face-smiling
[code_point] => 1F600
[status] => fully-qualified
[emoji] => 😀
[name] => grinning face
[version] => 1
)
:
:
see: Arrays > Predefined Constants > Sorting order flags.
<?php
use Sunaoka\EmojiParser\EmojiParser;
$options = [
'sort' => SORT_ASC,
];
$emojiParser = new EmojiParser('emoji-test.txt', $options);
$data = $emojiParser->parse();