random_bytes to generate cryptographically secure random bytes
$length : Length of the random string returned as bytes. Generates cryptographically secure pseudo-random bytes which can be used as Salts, keys etc. Available in PHP 7
Example
Output ( Refresh this page to to see how the random number changes )
|