sunaoka / emoji-parser
This package is abandoned and no longer maintained.
The author suggests using the sunaoka/emoji-utility package instead.
Parsing unicode emoji text file using PHP
1.5.0
2023-11-20 02:57 UTC
Requires
- php: ^7.0 || ^8.0
Requires (Dev)
- phpunit/phpunit: ^6.5 || ^7.0 || ^8.0 || ^9.0 || ^10.0
README
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).
Installation
composer require sunaoka/emoji-parser
Usage
<?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
)
:
:
Options
sort
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();