profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

fromRandom()

Description

Generates random alphanumeric strings

Syntax

$random = ByteString::fromRandom(6);                   // 'g6UkL2'
$randomPin = ByteString::fromRandom(4, '0123456789');  // '7385'
$randomKey = ByteString::fromRandom(1, 'WASD');        // 'S'

Related