PHP code example of chonla / randomizr

1. Go to this page and download the library: Download chonla/randomizr 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/ */

    

chonla / randomizr example snippets


$rand = new Randomizr;

$result = $rand->number(10);

$result = $rand->alphabet(10);

$result = $rand->alphanumeric(10);

$result = $rand->hexadecimal(10);

$result = $rand->rand("abc", 10);  // this will return a string containing either a or b or c with length of 10