PHP 8.1.15 Released!

Random\Engine\Secure::generate

(PHP 8 >= 8.2.0)

Random\Engine\Secure::generateGenerate cryptographically secure randomness

Description

public Random\Engine\Secure::generate(): string

Returns cryptographically secure randomness.

The sources of randomness used for this function are as follows:

Parameters

This function has no parameters.

Return Values

A string containing PHP_INT_SIZE cryptographically secure random bytes.

Errors/Exceptions

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top