PHP code example of eonx-com / easy-random

1. Go to this page and download the library: Download eonx-com/easy-random 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/ */

    

eonx-com / easy-random example snippets


// Will generate a random integer between 0 and 20 (both tor(...))->integer(0, 20);

$myString = (new \EonX\EasyRandom\Generator\RandomGenerator(...))
    ->string(16)
    ->excludeSimilar() // Will exclude similar characters
    ->excludeVowel() // Will exclude vowels, nice trick to avoid "bad words" in generated random strings
    ->

// Will generate "user friendly" random string:
// - exclude ambiguous characters
// - exclude symbols
// - exclude vowels
// - );

$uuid = (new \EonX\EasyRandom\Generator\RandomGenerator(...))->uuid();