(PHP 8 >= 8.2.0)
Random\Randomizer::getBytes — Get random bytes
$length
): string
Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Parameter zur Verfügung.
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.
length
is less than 1
,
a ValueError will be thrown.
Random\Randomizer::$engine
ausgelöst werden.
Beispiel #1 Random\Randomizer::getBytes() example
<?php
$r = new \Random\Randomizer();
echo bin2hex( $r->getBytes( 8 ) ), "\n";
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
ebdbe93cd56682c2