random_bytes

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

Example #1 random_bytes example

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


Function random_bytes:

CSPRNG Functions

Most used PHP functions