jfoza/php-random-string

Library to generate random strings using the PHP language.

Installs: 4

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/jfoza/php-random-string

v1.0.0 2024-09-30 13:59 UTC

This package is auto-updated.

Last update: 2025-12-29 04:08:29 UTC


README

Library to generate random strings using the PHP language.

Composer

$ composer require jfoza/php-random-string

Examples

use JFoza\PhpRandomString\RandomStringHelper;

$basicString = RandomStringHelper::basicGenerate();
$alphaString = RandomStringHelper::alphaGenerate();
$alnumString = RandomStringHelper::alnumGenerate();
$strings = RandomStringHelper::stringsGenerate();
$numericString = RandomStringHelper::numericGenerate();
$noZeroString = RandomStringHelper::noZeroGenerate();
$md5String = RandomStringHelper::md5Generate();
$sha1String = RandomStringHelper::sha1Generate();

echo $numericString;
echo $alphaString;
echo $alnumString;
echo $strings;
echo $numericString;
echo $noZeroString;
echo $md5String;
echo $sha1String;

*Improvements and feedback are welcome ;)