1. Go to this page and download the library: Download steppinghat/emoji-detector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teppingHat\EmojiDetector\EmojiDetector;
$input = "I ❤️ to 👨💻";
$detector = new EmojiDetector();
$emojis = $detector->detect($input);
print_r($emojis);
teppingHat\EmojiDetector\EmojiDetector;
$detector = new EmojiDetector();
$emojis = $detector->detectDistinct("WHAT IS A KILOMETER 🗣🗣🗣🦅🦅🦅")
print_r($emojis);
teppingHat\EmojiDetector\EmojiDetector;
$detector = new EmojiDetector();
$detector->isSingleEmoji("💩"); // Returns TRUE
$detector->isSingleEmoji("Time to dance 🌚"); // Returns FALSE
$detector->isSingleEmoji("🍆🍒"); // Returns FALSE