Random\Randomizer::__construct
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.2.0)
Constructs a new Randomizer
Description
Random\Randomizer::__construct(Random\Engine|null $engine = null)
Func
Parameters
engineThe
Random\Engineto use to generate randomness.If
engineis omitted or null, a newRandom\Engine\Secureobject will be used.
Examples
Random\Randomizer::__construct() example
php
<?php
$r = new \Random\Randomizer();
$r = new \Random\Randomizer(new \Random\Engine\Mt19937());
?>