PHP code example of questocat / epic-emoji

1. Go to this page and download the library: Download questocat/epic-emoji 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/ */

    

questocat / epic-emoji example snippets



$epicEmoji = new EpicEmoji();

// from Apple devices
$content = '呜呜,宝宝不开心😔';
$unified = $epicEmoji->unified($content);

$unified->emoji();        // output emoji
$unified->setText('哇哦👻')->emoji();   // output emoji
$unified->withText('哇哦👻')->emoji();  // output emoji
$unified->shorthand();    // output shorthand
$unified->codepoint();    // output codepoint
$unified->html();         // output html
$unified->htmlEntity();   // output htmlEntity

// convert to DoCoMo devices
$docomo = $unified->docomo();

// convert to Softbank & pre-iOS6 Apple devices
$softbank = $unified->softbank();

// convert to KDDI & Au devices
$kddi = $unified->kddi();

// convert to Google Android devices
$google = $unified->google();
$google->emoji();         // output emoji
$google->shorthand();     // output shorthand
$google->codepoint();     // output codepoint
$google->html();          // output html
$google->htmlEntity();    // output htmlEntity