jfoza/php-random-string

Library to generate random strings using the PHP language.

Maintainers

Package info

github.com/jfoza/jfoza-php-random-string

pkg:composer/jfoza/php-random-string

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

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

This package is auto-updated.

Last update: 2026-03-01 00:58:39 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 ;)