Searched refs:Randomizer (Results 1 – 25 of 27) sorted by relevance
12
2 Random: Randomizer: Calling __construct() fails due to readonly $engine property10 use Random\Randomizer;15 (new Randomizer())->__construct();21 $randomizer = new Randomizer(new Xoshiro256StarStar());28 $randomizer = new Randomizer(new TestShaEngine("1234"));35 $randomizer = new Randomizer(new Xoshiro256StarStar());47 Cannot modify readonly property Random\Randomizer::$engine48 Cannot modify readonly property Random\Randomizer::$engine49 Cannot modify readonly property Random\Randomizer::$engine50 Cannot modify readonly property Random\Randomizer::$engine
2 Random: Randomizer: The engine property must be readonly8 use Random\Randomizer;10 $randomizer = new Randomizer(new PcgOneseq128XslRr64(1234));11 $referenceRandomizer = new Randomizer(new PcgOneseq128XslRr64(1234));29 Cannot modify readonly property Random\Randomizer::$engine
2 Random: Randomizer: Serialization of the Randomizer fails if the engine is not serializable7 use Random\Randomizer;10 serialize(new Randomizer(new Secure()));
2 Random: Randomizer: Engines throwing an exception are gracefully handled7 use Random\Randomizer;17 $randomizer = new Randomizer(new ThrowingEngine());26 #1 %s(%d): Random\Randomizer->getBytes(1)
2 Random: Randomizer: Engines calling exit() are gracefully handled7 use Random\Randomizer;17 $randomizer = new Randomizer(new ExitingEngine());
2 Random: Randomizer: Native engines can be wrapped without changing their sequence11 use Random\Randomizer;23 $native_randomizer = new Randomizer(clone $engine);24 $user_randomizer = new Randomizer(new TestWrapperEngine(clone $engine));
2 Random: Randomizer: The Mt19937 engine is a drop-in replacement for mt_rand()6 use Random\Randomizer;11 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_PHP));28 $randomizer = new Randomizer(new Mt19937(1234, MT_RAND_MT19937));
2 Random: Randomizer: Serialization of the Randomizer must preserve the sequence11 use Random\Randomizer;25 $randomizer = new Randomizer($engine);
2 Random: Randomizer: The Mt19937 engine and pickArrayKeys are consistent with array_rand()7 use Random\Randomizer;20 $randomizer = new Randomizer(new Mt19937(1234));
2 Random: Randomizer: Heavily biased engines are detected and rejected7 use Random\Randomizer;17 function randomizer(): Randomizer19 return new Randomizer(new HeavilyBiasedEngine());
2 Random: Randomizer: Engines returning an empty string are detected and rejected7 use Random\Randomizer;17 function randomizer(): Randomizer19 return new Randomizer(new EmptyStringEngine());
7 …unserialize('O:17:"Random\Randomizer":1:{i:0;a:2:{s:3:"foo";N;s:6:"engine";O:32:"Random\Engine\Xos…14 Invalid serialization data for Random\Randomizer object
2 Random: Randomizer: Nul engines are correctly handled7 use Random\Randomizer;17 function randomizer(): Randomizer19 return new Randomizer(new NulEngine());
2 Random: Randomizer: pickArrayKeys(): Parameters are correctly validated6 use Random\Randomizer;8 function randomizer(): Randomizer10 return new Randomizer();45 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) must be of type array, string given46 Random\Randomizer::pickArrayKeys(): Argument #1 ($array) cannot be empty47 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…48 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…49 Random\Randomizer::pickArrayKeys(): Argument #2 ($num) must be between 1 and the number of elements…
2 GH-9415: Randomizer::getInt(0, 2**32 - 1) with Mt19937 always returns 16 use Random\Randomizer;9 $randomizer = new Randomizer(new Mt19937(1234));13 $randomizer = new Randomizer(new Mt19937(4321));
2 Random: Randomizer: nextInt(): Throws for 64 bit engines on 32 bit platforms8 use Random\Randomizer;11 $randomizer = new Randomizer(new Xoshiro256StarStar());
2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded7 use Random\Randomizer;19 $randomizer = new Randomizer(new ByteEngine());
2 Random: Randomizer: getInt(): Returned values with insufficient bits are correctly expanded (64 Bit)9 use Random\Randomizer;21 $randomizer = new Randomizer(new ByteEngine());
2 Random: Randomizer: getBytes(): Returned bytes are consistently expanded7 use Random\Randomizer;28 $randomizer = new Randomizer(new TestEngine());
2 Random: Randomizer: getBytes(): Basic functionality12 use Random\Randomizer;27 $randomizer = new Randomizer($engine);
2 Random: Randomizer: nextInt(): Basic functionality12 use Random\Randomizer;27 $randomizer = new Randomizer($engine);
2 Random: Randomizer: getInt(): Basic functionality12 use Random\Randomizer;27 $randomizer = new Randomizer($engine);
2 Random: Randomizer: shuffleArray(): Basic functionality12 use Random\Randomizer;27 $randomizer = new Randomizer($engine);
2 Random: Randomizer: shuffleBytes(): Basic functionality12 use Random\Randomizer;34 $randomizer = new Randomizer($engine);
2 Random: Randomizer: pickArrayKeys(): Basic functionality12 use Random\Randomizer;39 $randomizer = new Randomizer($engine);
Completed in 13 milliseconds