library random-string
A Random String generator based on character classes, with the possibility of excluding specific characters.
galvao/random-string
A Random String generator based on character classes, with the possibility of excluding specific characters.
- Monday, December 28, 2015
- by galvao
- Repository
- 1 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
RandomString
A Random String generator based on character classes, with the possibility of excluding specific characters., (*1)
END OF LIFE
As of PHP7 there are far better (and native!) ways of generating random data. Please check http://php.net/manual/en/ref.csprng.php, (*2)
This repo will remain as example material., (*3)
Usage
<?php
use RandomString\RandomString;
// Generates a 12 character string with lowercase letters and symbols, excluding the backslash and pipe chracters.
$str = new RandomString(12, array('lowerCase', 'symbols'), array('\\', '|'));
echo $str->result;