random_bytes

PHP 7, PHP 8
random_bytes - Generates cryptographically secure pseudo-random bytes

Example #1 random_bytes example

Result: string(10) "385e33f741"
PHP Version:


Example #2 of random_bytes

PHP Version:


Function random_bytes:

CSPRNG Functions

Most used PHP functions