PHP code example of chypriote / unique-names-generator
1. Go to this page and download the library: Download chypriote/unique-names-generator library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chypriote / unique-names-generator example snippets php
$generator = new Generator();
$name = $generator->generate();
echo $name; // --> PlannedRhinoceros
php
$generator = new Generator();
echo $generator->generate(); // --> TypicalWolf
echo $generator->generate(); // --> QualifiedKoala
echo $generator->generate(); // --> ConfusedCarp
echo $generator->generate(); // --> DepressedCanid
php
$generator = new Generator();
$generator->setDictionaries(['colors', 'animals']);
echo $generator->generate(); // --> OrangeWolverine
echo $generator->generate(); // --> MagentaMarten
echo $generator->generate(); // --> RedKingfisher
echo $generator->generate(); // --> AquaPigeon
php
$generator = new Generator();
$generator->setDictionaries(['colors', 'adjectives', 'animals'])->setLength(3);
echo $generator->generate(); // --> AzureLinguisticMongoose
echo $generator->generate(); // --> TurquoiseCanadianPuffin
echo $generator->generate(); // --> EmeraldWideFirefly
echo $generator->generate(); // --> PinkBloodyGoldfish
php
$generator = new Generator();
$generator
->setDictionaries(['colors', 'adjectives', 'animals'])
->setLength(3)
->setShuffle(true);
echo $generator->generate(); // --> CyanFiercePig
echo $generator->generate(); // --> NervousAzureUnicorn
echo $generator->generate(); // --> CoralLizardFellow
echo $generator->generate(); // --> EducationalKingfisherJade
php
$generator = new Generator();
$generator->setSeed(1234);
echo $generator->generate(); // --> GreatKangaroo
echo $generator->generate(); // --> ParentalCentipede
$generator = new Generator();
$generator->setSeed(1234);
echo $generator->generate(); // --> GreatKangaroo
echo $generator->generate(); // --> ParentalCentipede