hgati / emoticon-php

一款优雅的PHP表情符号包

1.0.0 2023-09-22 01:10 UTC

This package is auto-updated.

Last update: 2024-09-28 05:15:58 UTC


README

安装

在安装此包之前,您需要 PHPComposer

只需在项目目录中运行 composer require hgati/emoticon-php:dev-master

用法示例

    $emoji = new \Hgati\Emoticon\Emoticon();
    
    $emoji->random();  // will display an random emoji ==> 🍕️ (except emojis start with "flag-")
    $emoji->get('heart'); // it will return an emoji with heart ❤, note: this also support with colon 
    $emoji->get(':heart:');
    $emoji->search('hea'); // This will return an array with all emojies and key name matching with word `hea`
    $emoji->emojify('I like :metal: ');  // It will render the text with metal emoji