HaikunatorPHP alternatives and similar libraries
Based on the "Strings" category.
Alternatively, view HaikunatorPHP alternatives based on common mentions on social networks and blogs.
-
Mobile-Detect
Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. -
SQL Formatter
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting. -
Device Detector
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model. -
Slugify
Converts a string to a slug. Includes integrations for Symfony, Silex, Laravel, Zend Framework 2, Twig, Nette and Latte. -
Jieba-PHP
"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module. -
URLify
A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs. -
Google Translate For Free
Library for free use Google Translator. With attempts connecting on failure and array support. -
Case converter
Convert strings between 13 naming conventions: Snake case, Camel case, Kebab case, Pascal case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Title case, Sentence case and Dot notation. -
Russian metaphone phonetic algorithm implementation for PHP
Russian metaphone algorithm implementation
Cloudways' Black Friday Offer - 1st Choice of Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of HaikunatorPHP or a related project?
README
HaikunatorPHP
Generate Heroku-like random names to use in your PHP applications.
Installation
composer require atrox/haikunator
Usage
Haikunator is pretty simple.
use Atrox\Haikunator;
// default usage
Haikunator::haikunate() // => "wispy-dust-1337"
// custom length (default=4)
Haikunator::haikunate(["tokenLength" => 6]) // => "patient-king-887265"
// use hex instead of numbers
Haikunator::haikunate(["tokenHex" => true]) // => "purple-breeze-98e1"
// use custom chars instead of numbers/hex
Haikunator::haikunate(["tokenChars" => "HAIKUNATE"]) // => "summer-atom-IHEA"
// don't include a token
Haikunator::haikunate(["tokenLength" => 0]) // => "cold-wildflower"
// use a different delimiter
Haikunator::haikunate(["delimiter" => "."]) // => "restless.sea.7976"
// no token, space delimiter
Haikunator::haikunate(["tokenLength" => 0, "delimiter" => " "]) // => "delicate haze"
// no token, empty delimiter
Haikunator::haikunate(["tokenLength" => 0, "delimiter" => ""]) // => "billowingleaf"
// custom nouns and/or adjectives
Haikunator::$ADJECTIVES = ["red", "green", "blue"];
Haikunator::$NOUNS = ["reindeer"];
Haikunator::haikunate(); // => "blue-reindeer-4252"
Options
The following options are available:
Haikunator::haikunate([
"delimiter" => "-",
"tokenLength" => 4,
"tokenHex" => false,
"tokenChars" => "0123456789"
]);
// get/set nouns or adjectives
Haikunator::$ADJECTIVES
Haikunator::$NOUNS
If tokenHex
is true, it overrides any tokens specified in tokenChars
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
Other Languages
Haikunator is also available in other languages. Check them out:
- Node: https://github.com/Atrox/haikunatorjs
- .NET: https://github.com/Atrox/haikunator.net
- Python: https://github.com/Atrox/haikunatorpy
- Java: https://github.com/Atrox/haikunatorjava
- Go: https://github.com/Atrox/haikunatorgo
- Clojure: https://github.com/Atrox/haikunatorclj
- Dart: https://github.com/Atrox/haikunatordart
- Ruby: https://github.com/usmanbashir/haikunator
- Rust: https://github.com/nishanths/rust-haikunator