PHP Manual
Function Reference
Cryptography Extensions
CSPRNG
Introduction
Installing/Configuring
Predefined Constants
CSPRNG Functions
Predefined Constants
random_bytes
CSPRNG
PHP Manual
CSPRNG Functions
Table of Contents
random_bytes
— Generates cryptographically secure pseudo-random bytes
random_int
— Generates cryptographically secure pseudo-random integers