{"id":13409491,"url":"https://github.com/Stichoza/phemoji","last_synced_at":"2025-03-14T14:31:27.574Z","repository":{"id":57059925,"uuid":"46825370","full_name":"Stichoza/phemoji","owner":"Stichoza","description":"🐘 Emojis in PHP. Write code with emojis","archived":false,"fork":false,"pushed_at":"2015-11-30T21:29:33.000Z","size":13,"stargazers_count":33,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T20:37:08.453Z","etag":null,"topics":[],"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/Stichoza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-24T23:36:46.000Z","updated_at":"2021-07-14T07:59:27.000Z","dependencies_parsed_at":"2022-08-24T14:53:29.399Z","dependency_job_id":null,"html_url":"https://github.com/Stichoza/phemoji","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stichoza%2Fphemoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stichoza%2Fphemoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stichoza%2Fphemoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stichoza%2Fphemoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stichoza","download_url":"https://codeload.github.com/Stichoza/phemoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243593411,"owners_count":20316180,"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":[],"created_at":"2024-07-30T20:01:01.307Z","updated_at":"2025-03-14T14:31:22.561Z","avatar_url":"https://github.com/Stichoza.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"Phemoji\n====================\n\n![](https://img.shields.io/badge/build-👍-44cc11.svg) [![Latest Stable Version](https://img.shields.io/packagist/v/Stichoza/phemoji.svg)](https://packagist.org/packages/stichoza/phemoji) [![Total Downloads](https://img.shields.io/packagist/dt/Stichoza/phemoji.svg)](https://packagist.org/packages/stichoza/phemoji) [![Downloads Month](https://img.shields.io/packagist/dm/Stichoza/phemoji.svg)](https://packagist.org/packages/stichoza/phemoji)\n\nEmojis in PHP :elephant:\n\nHave you ever envied Swift having possibility to [use emojis](http://www.globalnerdy.com/2014/06/03/swift-fun-fact-1-you-can-use-emoji-characters-in-variable-constant-function-and-class-names/) in code? Well, you can use it in PHP too. I mean, it was possible for years. *\u0026#42;Shots fired\u0026#42;* :collision: :gun:\n\n## Installation\n\nInstall this package via [Composer](https://getcomposer.org/).\n\n```\ncomposer require stichoza/phemoji\n```\n\n## Usage\n\n### Getting Started\n\nAfter you have installed the package, you can just call `Phemoji::init()` and you're good to go!\n\n```php\n\\Stichoza\\Phemoji\\Phemoji::init();\n```\n\n**or**\n\n```php\nnamespace App\\Http\\Controlers\\Blabla;\n\n// ...\n\nuse Stichoza\\Phemoji\\Phemoji;\n\n// ...\n\nPhemoji::init();\n```\n\n\u003e **Note:** This will define some constants and functions in global scope. Once called it will be available everywhere. If you're using any PHP framework, it would be more convinient if you call this method somewhere in middleware or routes or any other place you prefer.\n\n### Use of emojis\n\nI have not written full docs yet. You can read the source code and you'll get everything what's going on here.\n\nExample:\n\n|   With Phemoji    |      Equivalent PHP         |\n|-------------------|-----------------------------|\n| :pencil2:(:capital_abcd:(\"Hello World!\")); | `printf(strtoupper(\"Hello World!\"));` |\n| :page_facing_up:(\"file.txt\"); | `file_get_contents(\"file.txt\");` |\n| :date:('Y-m-d', :alarm_clock:() + :slot_machine:(1000, 2000)); | `date('Y-m-d', time() + rand(1000, 2000));` |\n| :poop:(:bomb:('a', 'Katana!!!')); | `var_dump(explode('a', 'Katana!!!'));` |\n| $x = :+1:; | `$x = true;` |\n\nAnd so on. Take a look at full list in the source of [Phemoji.php](https://github.com/Stichoza/phemoji/blob/master/src/Stichoza/Phemoji/Phemoji.php)\n\n## Disclaimer\n\nThis package is created just for fun. I am not responsible if any emoji from this package will burn your house to the ground or murder your cute little kitten. Btw, if it ever kills a cat, notify me and I'll remove this repo from Github. I mean Octocat is also a cat.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStichoza%2Fphemoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStichoza%2Fphemoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStichoza%2Fphemoji/lists"}