Random\Randomizer::getBytes

(PHP 8 >= 8.2.0)

Random\Randomizer::getBytesGet random bytes

说明

public Random\Randomizer::getBytes(int $length): string

警告

本函数还未编写文档,仅有参数列表。

参数

length

The length of the random string that should be returned in bytes; must be 1 or greater.

返回值

A string containing the requested number of random bytes.

错误/异常

范例

示例 #1 Random\Randomizer::getBytes() example

<?php

/* ... */

?>

以上例程的输出类似于:

...

参见