Web Analytics

PHP random_bytes() Function

CSPRNG FunctionPHP 7.0.0+

The random_bytes() function performs a specific operation.

Syntax

random_bytes($param): mixed

Parameters

Parameter Type Description
$param mixed Function parameter

Return Value

Returns the result of the operation.

Try It Online

Output
Click Run to execute your code

Common Use Cases

  • Data processing
  • Common PHP operations