1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
<?php
/** @generate-class-entries */
namespace {
/**
* @var int
* @cvalue MT_RAND_MT19937
*/
const MT_RAND_MT19937 = UNKNOWN;
/**
* @var int
* @deprecated
* @cvalue MT_RAND_PHP
*/
const MT_RAND_PHP = UNKNOWN;
#[\Deprecated(since: '8.4', message: "use \\Random\\Randomizer::getFloat() instead")]
function lcg_value(): float {}
function mt_srand(?int $seed = null, int $mode = MT_RAND_MT19937): void {}
/** @alias mt_srand */
function srand(?int $seed = null, int $mode = MT_RAND_MT19937): void {}
function rand(int $min = UNKNOWN, int $max = UNKNOWN): int {}
function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {}
function mt_getrandmax(): int {}
/** @alias mt_getrandmax */
function getrandmax(): int {}
/** @refcount 1 */
function random_bytes(int $length): string {}
function random_int(int $min, int $max): int {}
}
namespace Random\Engine
{
/**
* @strict-properties
*/
final class Mt19937 implements \Random\Engine
{
public function __construct(int|null $seed = null, int $mode = MT_RAND_MT19937) {}
public function generate(): string {}
public function __serialize(): array {}
public function __unserialize(array $data): void {}
public function __debugInfo(): array {}
}
/**
* @strict-properties
*/
final class PcgOneseq128XslRr64 implements \Random\Engine
{
public function __construct(string|int|null $seed = null) {}
/** @implementation-alias Random\Engine\Mt19937::generate */
public function generate(): string {}
public function jump(int $advance): void {}
/** @implementation-alias Random\Engine\Mt19937::__serialize */
public function __serialize(): array {}
/** @implementation-alias Random\Engine\Mt19937::__unserialize */
public function __unserialize(array $data): void {}
/** @implementation-alias Random\Engine\Mt19937::__debugInfo */
public function __debugInfo(): array {}
}
/**
* @strict-properties
*/
final class Xoshiro256StarStar implements \Random\Engine
{
public function __construct(string|int|null $seed = null) {}
/** @implementation-alias Random\Engine\Mt19937::generate */
public function generate(): string {}
public function jump(): void {}
public function jumpLong(): void {}
/** @implementation-alias Random\Engine\Mt19937::__serialize */
public function __serialize(): array {}
/** @implementation-alias Random\Engine\Mt19937::__unserialize */
public function __unserialize(array $data): void {}
/** @implementation-alias Random\Engine\Mt19937::__debugInfo */
public function __debugInfo(): array {}
}
/**
* @strict-properties
* @not-serializable
*/
final class Secure implements \Random\CryptoSafeEngine
{
/** @implementation-alias Random\Engine\Mt19937::generate */
public function generate(): string {}
}
}
namespace Random
{
interface Engine
{
public function generate(): string;
}
interface CryptoSafeEngine extends Engine
{
}
/**
* @strict-properties
*/
final class Randomizer
{
public readonly Engine $engine;
public function __construct(?Engine $engine = null) {}
public function nextInt(): int {}
public function nextFloat(): float {}
public function getFloat(float $min, float $max, IntervalBoundary $boundary = IntervalBoundary::ClosedOpen): float {}
public function getInt(int $min, int $max): int {}
public function getBytes(int $length): string {}
public function getBytesFromString(string $string, int $length): string {}
public function shuffleArray(array $array): array {}
public function shuffleBytes(string $bytes): string {}
public function pickArrayKeys(array $array, int $num): array {}
public function __serialize(): array {}
public function __unserialize(array $data): void {}
}
enum IntervalBoundary {
case ClosedOpen;
case ClosedClosed;
case OpenClosed;
case OpenOpen;
}
/**
* @strict-properties
*/
class RandomError extends \Error
{
}
/**
* @strict-properties
*/
class BrokenRandomEngineError extends RandomError
{
}
/**
* @strict-properties
*/
class RandomException extends \Exception
{
}
}
|