PHP code example of opensourcerefinery / random-string-generator
1. Go to this page and download the library: Download opensourcerefinery/random-string-generator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
opensourcerefinery / random-string-generator example snippets
$generator = new StringOfFormat(4, 'ab');
$this->assertRegExp('/[ab]{4}/', $generator->generate());
$string = RandomStringGenerator::randomString(16);
echo $string;
// vuHlvV9NTCwBbIxa