--TEST-- Random: Randomizer: Serialization of the Randomizer must preserve the sequence --FILE-- getInt(0, $i); } $randomizer2 = unserialize(serialize($randomizer)); for ($i = 0; $i < 10_000; $i++) { if ($randomizer->getInt(0, $i) !== $randomizer2->getInt(0, $i)) { $className = $engine::class; die("failure: state differs at {$i}"); } } } die('success'); ?> --EXPECT-- Random\Engine\Mt19937 Random\Engine\Mt19937 Random\Engine\PcgOneseq128XslRr64 Random\Engine\Xoshiro256StarStar Random\Engine\Test\TestShaEngine success