-
Notifications
You must be signed in to change notification settings - Fork 0
Home
b-and-p edited this page Mar 15, 2016
·
2 revisions
A simple PHP class for random string generation.
Code example below:
include ('RandString.php');
$oRS = new RandStrNS\RandString();
$oRS->part_length = 2; // INT
$oRS->parts = 2; // INT
$oRS->delim = '-'; // STR
$oRS->prefix = ''; // STR
$oRS->suffix = ''; // STR
$oRS->count = 1; // INT
$oRS->unique = false; //BOOL
$oRS->flags = 3; // INT Bitmask (000011)
$result = $oRS->generate();
var_dump_result();
Will Output:
Array('gR-Fc')