{"id":15296280,"url":"https://github.com/maximal/emoji-php","last_synced_at":"2025-04-13T19:41:25.116Z","repository":{"id":57016596,"uuid":"231621625","full_name":"maximal/emoji-php","owner":"maximal","description":"Emoji Detecting and Processing in PHP","archived":false,"fork":false,"pushed_at":"2023-05-04T15:51:48.000Z","size":35,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T10:21:19.090Z","etag":null,"topics":["detection","detector","emoji","emoji-searcher","emojis","php","php-lib","php-library","php7"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maximal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-03T16:09:22.000Z","updated_at":"2023-09-26T21:24:47.000Z","dependencies_parsed_at":"2024-10-15T01:21:43.352Z","dependency_job_id":"021bccc5-64db-4e1a-8011-ae9a07e39dad","html_url":"https://github.com/maximal/emoji-php","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"6dc488c3060cf8c3cffd6e207816397b0e0da684"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximal%2Femoji-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximal%2Femoji-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximal%2Femoji-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maximal%2Femoji-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maximal","download_url":"https://codeload.github.com/maximal/emoji-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381789,"owners_count":21094528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detection","detector","emoji","emoji-searcher","emojis","php","php-lib","php-library","php7"],"created_at":"2024-09-30T18:09:57.064Z","updated_at":"2025-04-13T19:41:25.089Z","avatar_url":"https://github.com/maximal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emoji Detecting and Processing\n\nUnicode version: 15.0.\n\n\n## Installation\n\nInstall this library using the [Composer](https://getcomposer.org) `require` command:\n\n```sh\ncomposer require maximal/emoji '^1.0'\n```\n\nor add the package name to the `require` section of your `composer.json` file:\n```\n\"require\": {\n\t\"maximal/emoji\": \"^1.0\"\n}\n```\n\nand then run:\n```sh\ncomposer update\n```\n\nThen include Composer autoload anywhere in your code:\n```php\nrequire_once __DIR__ . '/vendor/autoload.php';\n```\n\n\n## Usage\n\n```php\nuse Maximal\\Emoji\\Detector;\n\n// Whether the given string contains emoji characters\n$isEmojiFound = Detector::containsEmoji($string);\n// 'test' -\u003e false\n// 'test 👍' -\u003e true\n\n// Whether the given string consists of emoji characters only\n$isEmojiOnly = Detector::onlyEmoji($string);\n// 'test 👍' -\u003e false\n// '👍😘' -\u003e true\n\n// String without any emoji character\n$stringWithoutEmoji = Detector::removeEmoji($string);\n// 'test 👍' -\u003e 'test '\n// '👍😘' -\u003e ''\n\n// All emojis of the string\n$allEmojis = Detector::allEmojis($string);\n// 'test 👍' -\u003e ['👍']\n// '👍😘' -\u003e ['👍', '😘']\n\n// Starting emojis of the string\n$startingEmojis = Detector::startingEmojis($string);\n// '👍😘 test' -\u003e ['👍', '😘']\n// 'test 👍' -\u003e []\n```\n\n### `containsEmoji($string): bool`\nDetects whether the given string contains one or more emoji characters.\n\n### `onlyEmoji($string, $ignoreWhitespace = true): bool`\nDetects whether the given string consists of emoji characters only.\n\nThis method ignores any spaces, tabs and other whitespace characters (`\\s`).\nPass `false` to the second parameter for not ignoring whitespace characters.\n\n### `removeEmoji($string): string`\nReturns the given string with all emoji characters removed.\n\n### `allEmojis($string): array`\nReturns an array of all emojis of the input string.\n\n### `startingEmojis($string, $ignoreWhitespace = true): array`\nReturns an array of starting emojis of the input string.\n\nThis method ignores any spaces, tabs and other whitespace characters (`\\s`).\nPass `false` to the second parameter for not ignoring whitespace characters.\n\n\n## Tests\n\nRun simple tests:\n```sh\nphp test/tests.php\n```\n\nExpected output:\n```\nTests total:  119\n        run:  119\n  succeeded:  119\n     failed:  0\n```\n\n\n## Contact the author\n* Website: https://maximals.ru (Russian)\n* Twitter: https://twitter.com/almaximal\n* Telegram: https://t.me/maximal\n* Sijeko Company: https://sijeko.ru (web, mobile, desktop applications development and graphic design)\n* Personal GitHub: https://github.com/maximal\n* Company’s GitHub: https://github.com/sijeko\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximal%2Femoji-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximal%2Femoji-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximal%2Femoji-php/lists"}