Random string generator make from colours, animals and numbers.
All code is PSR-2 friendly
Via Composer
$ composer require jamosaur/randstring
// Generate a random string.
$rand = new Jamosaur\Randstring\Randstring();
echo $rand->generate();
// buoyantwhitetippedreefshark56
// Generate a sentence case string that is no greater than 15 characters long.
$rand = new Jamosaur\Randstring\Randstring('sentence', 15);
echo $rand->generate();
// BumpySquirrel32
// Generate a string with the first letter in uppercase that is no greater than 20 characters long.
$rand = new Jamosaur\Randstring\Randstring('ucfirst', 20);
echo $rand->generate();
// Moistmountaincat75
// Generate a string with the first letter in uppercase that is no longer than 35 characters long with a random
// number between 123 and 143.
$rand = new Jamosaur\Randstring\Randstring('ucfirst', 35, 123, 143);
echo $rand->generate();
// Tangibleindianrockpython127
// Generate a string formatted in camelCase
$rand = new Jamosaur\Randstring\Randstring('camel');
echo $rand->generate();
// carefulZebra23
Please see CHANGELOG for more information what has changed recently.
The MIT License (MIT). Please see License File for more information.