public static function char($symbol)
    {

        if (is_string($symbol) && EmojiDictionary::get($symbol))
            $symbol =  EmojiDictionary::get($symbol);


        // In case that multiple unicode sequences are used
        if (is_array($symbol))
        {
            $output = '';

            foreach ($symbol as $sequence)
                $output .= self::char($sequence);

            return $output;
        }

        return self::uni2utf8($symbol);

        // Another alternative solution is to use mb_convert_encoding (Slow and it requires MB)
        // echo mb_convert_encoding('&#x1F600;', 'UTF-8', 'HTML-ENTITIES');
    }
public static function char($symbol)
    {

        if (is_string($symbol) && EmojiDictionary::get($symbol))
            $symbol =  EmojiDictionary::get($symbol);


        // In case that multiple unicode sequences are used
        if (is_array($symbol))
        {
            $output = '';

            foreach ($symbol as $sequence)
                $output .= self::char($sequence);

            return $output;
        }

        return self::uni2utf8($symbol);

        // Another alternative solution is to use mb_convert_encoding (Slow and it requires MB)
        // echo mb_convert_encoding('&#x1F600;', 'UTF-8', 'HTML-ENTITIES');
    }
public static function char ( $ symbol ) { if ( is_string ( $ symbol ) && EmojiDictionary :: get ( $ symbol ) ) $ symbol = EmojiDictionary :: get ( $ symbol ) ; // In case that multiple unicode sequences are used if ( is_array ( $ symbol ) ) { $ output = '' ; foreach ( $ symbol as $ sequence ) $ output .= self :: char ( $ sequence ) ; return $ output ; } return self :: uni2utf8 ( $ symbol ) ; // Another alternative solution is to use mb_convert_encoding (Slow and it requires MB) // echo mb_convert_encoding('&#x1F600;', 'UTF-8', 'HTML-ENTITIES'); }
Return an emoji as char

@param $symbol
@return bool|string
Return an emoji as char