deniskorbakov/emoji-php
Composer 安装命令:
composer require deniskorbakov/emoji-php
包简介
Library for Emoji in PHP - replacement, search, transformation by CLDR
README 文档
README
✨ Supports CLDR emoticon storage standard
🌏 Multilingual search from 25 languages
🪄 Replacing unicode emoticons in CLDR format and vice versa
@ This library uses a database of emoticons from - link
📝 Getting Started
Install the package via composer:
composer require deniskorbakov/emoji-php
Now you can use the class with emoticons:
use DenisKorbakov\EmojiPhp\Emojis; new Emojis();
Below we will consider the functionality of this class.
📖 Examples & Usage
This method outputs a grouping of emoticons with a cldr code based on the selected language
use DenisKorbakov\EmojiPhp\Emojis; use DenisKorbakov\EmojiPhp\Locale; new Emojis()->list(Locale::EN); // return ['smileys & emotion' => ['😀' => ':grinning_face:', ...]]
This method converts the unicode of the emoji to the cldr code
use DenisKorbakov\EmojiPhp\Emojis; $text = 'Hello, world! 🌍️' new Emojis()->toCode($text); // return 'Hello, world! :globe_showing_europe_africa:'
This method converts the one unicode emoji to the cldr code
use DenisKorbakov\EmojiPhp\Emojis; $emoji = '🌍' new Emojis()->codeByEmoji($text); // return ':globe_showing_europe_africa:'
This method converts from cldr code with text to unicode emojis
use DenisKorbakov\EmojiPhp\Emojis; $text = 'Hello :waving_hand:'; new Emojis()->toEmoji($text); // return 'Hello 👋'
This method converts one cldr code to unicode emoji
use DenisKorbakov\EmojiPhp\Emojis; $text = ':waving_hand:'; new Emojis()->emojiByCode($text); // return '👋'
This method searches for emoticons by the word, and you also explicitly specify which language to search in
use DenisKorbakov\EmojiPhp\Emojis; use DenisKorbakov\EmojiPhp\Locale; $searchText = 'shoe' new Emojis()->search(Locale::EN, $searchText); // return ['👞' => ':mans_shoe:', ...]
⚒️ Local Development
Clone this repository:
git clone https://github.com/deniskorbakov/emoji-php
Let's go to the cloned repository:
cd emoji-php
To start, initialize the project and use it:
make init
🧪 Testing
You can run the command for testing after the step with local installation
Run Lint and Analyze code(phpstan/rector/phpcs):
make lint
Run Unit tests:
make test
Run test coverage:
make test-coverage
🤝 Feedback
We appreciate your support and look forward to making our product even better with your help!
📝 Generated from deniskorbakov/skeleton-php-docker
deniskorbakov/emoji-php 适用场景与选型建议
deniskorbakov/emoji-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 36 次下载、GitHub Stars 达 8, 最近一次更新时间为 2025 年 09 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「emoji」 「cldr」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 deniskorbakov/emoji-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 deniskorbakov/emoji-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 deniskorbakov/emoji-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Laravel 5 Package for Using & Working With Emojis
Slug Generator
A php class that has descriptive names for the emojis and said emojis as its value
PHP Unicode library
Language data and utilities.
Country Flag Emoji for PHP
统计信息
- 总下载量: 36
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-12