PHP code example of aksafan / yii2-emoji-detection
1. Go to this page and download the library: Download aksafan/yii2-emoji-detection 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/ */
/**
* Class WebApplication
* Include only Web application related components here.
*
* @property \aksafan\emoji\source\EmojiDetector $emojiDetector
*/
class WebApplication extends yii\web\Application
{
}
Yii::$app->emojiDetector
$input = "Hello 👍🏼 World 👨👩👦👦";
$emoji = Yii::$app->emojiDetector->detectAll($input);
print_r($emoji);