1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: a0a8ed6c28673b92c1be5fdac34a796e5ed88832 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_lcg_value, 0, 0, IS_DOUBLE, 0)
5 ZEND_END_ARG_INFO()
6
7 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_srand, 0, 0, IS_VOID, 0)
8 ZEND_ARG_TYPE_INFO(0, seed, IS_LONG, 0)
9 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MT_RAND_MT19937")
10 ZEND_END_ARG_INFO()
11
12 #define arginfo_srand arginfo_mt_srand
13
14 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rand, 0, 0, IS_LONG, 0)
15 ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0)
16 ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0)
17 ZEND_END_ARG_INFO()
18
19 #define arginfo_mt_rand arginfo_rand
20
21 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mt_getrandmax, 0, 0, IS_LONG, 0)
22 ZEND_END_ARG_INFO()
23
24 #define arginfo_getrandmax arginfo_mt_getrandmax
25
26 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_random_bytes, 0, 1, IS_STRING, 0)
27 ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)
28 ZEND_END_ARG_INFO()
29
30 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_random_int, 0, 2, IS_LONG, 0)
31 ZEND_ARG_TYPE_INFO(0, min, IS_LONG, 0)
32 ZEND_ARG_TYPE_INFO(0, max, IS_LONG, 0)
33 ZEND_END_ARG_INFO()
34
35 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Random_Engine_Mt19937___construct, 0, 0, 0)
36 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 1, "null")
37 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "MT_RAND_MT19937")
38 ZEND_END_ARG_INFO()
39
40 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Engine_Mt19937_generate, 0, 0, IS_STRING, 0)
41 ZEND_END_ARG_INFO()
42
43 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Engine_Mt19937___serialize, 0, 0, IS_ARRAY, 0)
44 ZEND_END_ARG_INFO()
45
46 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Engine_Mt19937___unserialize, 0, 1, IS_VOID, 0)
47 ZEND_ARG_TYPE_INFO(0, data, IS_ARRAY, 0)
48 ZEND_END_ARG_INFO()
49
50 #define arginfo_class_Random_Engine_Mt19937___debugInfo arginfo_class_Random_Engine_Mt19937___serialize
51
52 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Random_Engine_PcgOneseq128XslRr64___construct, 0, 0, 0)
53 ZEND_ARG_TYPE_MASK(0, seed, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_NULL, "null")
54 ZEND_END_ARG_INFO()
55
56 #define arginfo_class_Random_Engine_PcgOneseq128XslRr64_generate arginfo_class_Random_Engine_Mt19937_generate
57
58 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Engine_PcgOneseq128XslRr64_jump, 0, 1, IS_VOID, 0)
59 ZEND_ARG_TYPE_INFO(0, advance, IS_LONG, 0)
60 ZEND_END_ARG_INFO()
61
62 #define arginfo_class_Random_Engine_PcgOneseq128XslRr64___serialize arginfo_class_Random_Engine_Mt19937___serialize
63
64 #define arginfo_class_Random_Engine_PcgOneseq128XslRr64___unserialize arginfo_class_Random_Engine_Mt19937___unserialize
65
66 #define arginfo_class_Random_Engine_PcgOneseq128XslRr64___debugInfo arginfo_class_Random_Engine_Mt19937___serialize
67
68 #define arginfo_class_Random_Engine_Xoshiro256StarStar___construct arginfo_class_Random_Engine_PcgOneseq128XslRr64___construct
69
70 #define arginfo_class_Random_Engine_Xoshiro256StarStar_generate arginfo_class_Random_Engine_Mt19937_generate
71
72 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Engine_Xoshiro256StarStar_jump, 0, 0, IS_VOID, 0)
73 ZEND_END_ARG_INFO()
74
75 #define arginfo_class_Random_Engine_Xoshiro256StarStar_jumpLong arginfo_class_Random_Engine_Xoshiro256StarStar_jump
76
77 #define arginfo_class_Random_Engine_Xoshiro256StarStar___serialize arginfo_class_Random_Engine_Mt19937___serialize
78
79 #define arginfo_class_Random_Engine_Xoshiro256StarStar___unserialize arginfo_class_Random_Engine_Mt19937___unserialize
80
81 #define arginfo_class_Random_Engine_Xoshiro256StarStar___debugInfo arginfo_class_Random_Engine_Mt19937___serialize
82
83 #define arginfo_class_Random_Engine_Secure_generate arginfo_class_Random_Engine_Mt19937_generate
84
85 #define arginfo_class_Random_Engine_generate arginfo_class_Random_Engine_Mt19937_generate
86
87 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Random_Randomizer___construct, 0, 0, 0)
88 ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, engine, Random\\Engine, 1, "null")
89 ZEND_END_ARG_INFO()
90
91 #define arginfo_class_Random_Randomizer_nextInt arginfo_mt_getrandmax
92
93 #define arginfo_class_Random_Randomizer_getInt arginfo_random_int
94
95 #define arginfo_class_Random_Randomizer_getBytes arginfo_random_bytes
96
97 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Randomizer_shuffleArray, 0, 1, IS_ARRAY, 0)
98 ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
99 ZEND_END_ARG_INFO()
100
101 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Randomizer_shuffleBytes, 0, 1, IS_STRING, 0)
102 ZEND_ARG_TYPE_INFO(0, bytes, IS_STRING, 0)
103 ZEND_END_ARG_INFO()
104
105 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Random_Randomizer_pickArrayKeys, 0, 2, IS_ARRAY, 0)
106 ZEND_ARG_TYPE_INFO(0, array, IS_ARRAY, 0)
107 ZEND_ARG_TYPE_INFO(0, num, IS_LONG, 0)
108 ZEND_END_ARG_INFO()
109
110 #define arginfo_class_Random_Randomizer___serialize arginfo_class_Random_Engine_Mt19937___serialize
111
112 #define arginfo_class_Random_Randomizer___unserialize arginfo_class_Random_Engine_Mt19937___unserialize
113
114
115 ZEND_FUNCTION(lcg_value);
116 ZEND_FUNCTION(mt_srand);
117 ZEND_FUNCTION(rand);
118 ZEND_FUNCTION(mt_rand);
119 ZEND_FUNCTION(mt_getrandmax);
120 ZEND_FUNCTION(random_bytes);
121 ZEND_FUNCTION(random_int);
122 ZEND_METHOD(Random_Engine_Mt19937, __construct);
123 ZEND_METHOD(Random_Engine_Mt19937, generate);
124 ZEND_METHOD(Random_Engine_Mt19937, __serialize);
125 ZEND_METHOD(Random_Engine_Mt19937, __unserialize);
126 ZEND_METHOD(Random_Engine_Mt19937, __debugInfo);
127 ZEND_METHOD(Random_Engine_PcgOneseq128XslRr64, __construct);
128 ZEND_METHOD(Random_Engine_PcgOneseq128XslRr64, jump);
129 ZEND_METHOD(Random_Engine_Xoshiro256StarStar, __construct);
130 ZEND_METHOD(Random_Engine_Xoshiro256StarStar, jump);
131 ZEND_METHOD(Random_Engine_Xoshiro256StarStar, jumpLong);
132 ZEND_METHOD(Random_Randomizer, __construct);
133 ZEND_METHOD(Random_Randomizer, nextInt);
134 ZEND_METHOD(Random_Randomizer, getInt);
135 ZEND_METHOD(Random_Randomizer, getBytes);
136 ZEND_METHOD(Random_Randomizer, shuffleArray);
137 ZEND_METHOD(Random_Randomizer, shuffleBytes);
138 ZEND_METHOD(Random_Randomizer, pickArrayKeys);
139 ZEND_METHOD(Random_Randomizer, __serialize);
140 ZEND_METHOD(Random_Randomizer, __unserialize);
141
142
143 static const zend_function_entry ext_functions[] = {
144 ZEND_FE(lcg_value, arginfo_lcg_value)
145 ZEND_FE(mt_srand, arginfo_mt_srand)
146 ZEND_FALIAS(srand, mt_srand, arginfo_srand)
147 ZEND_FE(rand, arginfo_rand)
148 ZEND_FE(mt_rand, arginfo_mt_rand)
149 ZEND_FE(mt_getrandmax, arginfo_mt_getrandmax)
150 ZEND_FALIAS(getrandmax, mt_getrandmax, arginfo_getrandmax)
151 ZEND_FE(random_bytes, arginfo_random_bytes)
152 ZEND_FE(random_int, arginfo_random_int)
153 ZEND_FE_END
154 };
155
156
157 static const zend_function_entry class_Random_Engine_Mt19937_methods[] = {
158 ZEND_ME(Random_Engine_Mt19937, __construct, arginfo_class_Random_Engine_Mt19937___construct, ZEND_ACC_PUBLIC)
159 ZEND_ME(Random_Engine_Mt19937, generate, arginfo_class_Random_Engine_Mt19937_generate, ZEND_ACC_PUBLIC)
160 ZEND_ME(Random_Engine_Mt19937, __serialize, arginfo_class_Random_Engine_Mt19937___serialize, ZEND_ACC_PUBLIC)
161 ZEND_ME(Random_Engine_Mt19937, __unserialize, arginfo_class_Random_Engine_Mt19937___unserialize, ZEND_ACC_PUBLIC)
162 ZEND_ME(Random_Engine_Mt19937, __debugInfo, arginfo_class_Random_Engine_Mt19937___debugInfo, ZEND_ACC_PUBLIC)
163 ZEND_FE_END
164 };
165
166
167 static const zend_function_entry class_Random_Engine_PcgOneseq128XslRr64_methods[] = {
168 ZEND_ME(Random_Engine_PcgOneseq128XslRr64, __construct, arginfo_class_Random_Engine_PcgOneseq128XslRr64___construct, ZEND_ACC_PUBLIC)
169 ZEND_MALIAS(Random_Engine_Mt19937, generate, generate, arginfo_class_Random_Engine_PcgOneseq128XslRr64_generate, ZEND_ACC_PUBLIC)
170 ZEND_ME(Random_Engine_PcgOneseq128XslRr64, jump, arginfo_class_Random_Engine_PcgOneseq128XslRr64_jump, ZEND_ACC_PUBLIC)
171 ZEND_MALIAS(Random_Engine_Mt19937, __serialize, __serialize, arginfo_class_Random_Engine_PcgOneseq128XslRr64___serialize, ZEND_ACC_PUBLIC)
172 ZEND_MALIAS(Random_Engine_Mt19937, __unserialize, __unserialize, arginfo_class_Random_Engine_PcgOneseq128XslRr64___unserialize, ZEND_ACC_PUBLIC)
173 ZEND_MALIAS(Random_Engine_Mt19937, __debugInfo, __debugInfo, arginfo_class_Random_Engine_PcgOneseq128XslRr64___debugInfo, ZEND_ACC_PUBLIC)
174 ZEND_FE_END
175 };
176
177
178 static const zend_function_entry class_Random_Engine_Xoshiro256StarStar_methods[] = {
179 ZEND_ME(Random_Engine_Xoshiro256StarStar, __construct, arginfo_class_Random_Engine_Xoshiro256StarStar___construct, ZEND_ACC_PUBLIC)
180 ZEND_MALIAS(Random_Engine_Mt19937, generate, generate, arginfo_class_Random_Engine_Xoshiro256StarStar_generate, ZEND_ACC_PUBLIC)
181 ZEND_ME(Random_Engine_Xoshiro256StarStar, jump, arginfo_class_Random_Engine_Xoshiro256StarStar_jump, ZEND_ACC_PUBLIC)
182 ZEND_ME(Random_Engine_Xoshiro256StarStar, jumpLong, arginfo_class_Random_Engine_Xoshiro256StarStar_jumpLong, ZEND_ACC_PUBLIC)
183 ZEND_MALIAS(Random_Engine_Mt19937, __serialize, __serialize, arginfo_class_Random_Engine_Xoshiro256StarStar___serialize, ZEND_ACC_PUBLIC)
184 ZEND_MALIAS(Random_Engine_Mt19937, __unserialize, __unserialize, arginfo_class_Random_Engine_Xoshiro256StarStar___unserialize, ZEND_ACC_PUBLIC)
185 ZEND_MALIAS(Random_Engine_Mt19937, __debugInfo, __debugInfo, arginfo_class_Random_Engine_Xoshiro256StarStar___debugInfo, ZEND_ACC_PUBLIC)
186 ZEND_FE_END
187 };
188
189
190 static const zend_function_entry class_Random_Engine_Secure_methods[] = {
191 ZEND_MALIAS(Random_Engine_Mt19937, generate, generate, arginfo_class_Random_Engine_Secure_generate, ZEND_ACC_PUBLIC)
192 ZEND_FE_END
193 };
194
195
196 static const zend_function_entry class_Random_Engine_methods[] = {
197 ZEND_ABSTRACT_ME_WITH_FLAGS(Random_Engine, generate, arginfo_class_Random_Engine_generate, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
198 ZEND_FE_END
199 };
200
201
202 static const zend_function_entry class_Random_CryptoSafeEngine_methods[] = {
203 ZEND_FE_END
204 };
205
206
207 static const zend_function_entry class_Random_Randomizer_methods[] = {
208 ZEND_ME(Random_Randomizer, __construct, arginfo_class_Random_Randomizer___construct, ZEND_ACC_PUBLIC)
209 ZEND_ME(Random_Randomizer, nextInt, arginfo_class_Random_Randomizer_nextInt, ZEND_ACC_PUBLIC)
210 ZEND_ME(Random_Randomizer, getInt, arginfo_class_Random_Randomizer_getInt, ZEND_ACC_PUBLIC)
211 ZEND_ME(Random_Randomizer, getBytes, arginfo_class_Random_Randomizer_getBytes, ZEND_ACC_PUBLIC)
212 ZEND_ME(Random_Randomizer, shuffleArray, arginfo_class_Random_Randomizer_shuffleArray, ZEND_ACC_PUBLIC)
213 ZEND_ME(Random_Randomizer, shuffleBytes, arginfo_class_Random_Randomizer_shuffleBytes, ZEND_ACC_PUBLIC)
214 ZEND_ME(Random_Randomizer, pickArrayKeys, arginfo_class_Random_Randomizer_pickArrayKeys, ZEND_ACC_PUBLIC)
215 ZEND_ME(Random_Randomizer, __serialize, arginfo_class_Random_Randomizer___serialize, ZEND_ACC_PUBLIC)
216 ZEND_ME(Random_Randomizer, __unserialize, arginfo_class_Random_Randomizer___unserialize, ZEND_ACC_PUBLIC)
217 ZEND_FE_END
218 };
219
220
221 static const zend_function_entry class_Random_RandomError_methods[] = {
222 ZEND_FE_END
223 };
224
225
226 static const zend_function_entry class_Random_BrokenRandomEngineError_methods[] = {
227 ZEND_FE_END
228 };
229
230
231 static const zend_function_entry class_Random_RandomException_methods[] = {
232 ZEND_FE_END
233 };
234
register_random_symbols(int module_number)235 static void register_random_symbols(int module_number)
236 {
237 REGISTER_LONG_CONSTANT("MT_RAND_MT19937", MT_RAND_MT19937, CONST_PERSISTENT);
238 REGISTER_LONG_CONSTANT("MT_RAND_PHP", MT_RAND_PHP, CONST_PERSISTENT);
239 }
240
register_class_Random_Engine_Mt19937(zend_class_entry * class_entry_Random_Engine)241 static zend_class_entry *register_class_Random_Engine_Mt19937(zend_class_entry *class_entry_Random_Engine)
242 {
243 zend_class_entry ce, *class_entry;
244
245 INIT_NS_CLASS_ENTRY(ce, "Random\\Engine", "Mt19937", class_Random_Engine_Mt19937_methods);
246 class_entry = zend_register_internal_class_ex(&ce, NULL);
247 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
248 zend_class_implements(class_entry, 1, class_entry_Random_Engine);
249
250 return class_entry;
251 }
252
register_class_Random_Engine_PcgOneseq128XslRr64(zend_class_entry * class_entry_Random_Engine)253 static zend_class_entry *register_class_Random_Engine_PcgOneseq128XslRr64(zend_class_entry *class_entry_Random_Engine)
254 {
255 zend_class_entry ce, *class_entry;
256
257 INIT_NS_CLASS_ENTRY(ce, "Random\\Engine", "PcgOneseq128XslRr64", class_Random_Engine_PcgOneseq128XslRr64_methods);
258 class_entry = zend_register_internal_class_ex(&ce, NULL);
259 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
260 zend_class_implements(class_entry, 1, class_entry_Random_Engine);
261
262 return class_entry;
263 }
264
register_class_Random_Engine_Xoshiro256StarStar(zend_class_entry * class_entry_Random_Engine)265 static zend_class_entry *register_class_Random_Engine_Xoshiro256StarStar(zend_class_entry *class_entry_Random_Engine)
266 {
267 zend_class_entry ce, *class_entry;
268
269 INIT_NS_CLASS_ENTRY(ce, "Random\\Engine", "Xoshiro256StarStar", class_Random_Engine_Xoshiro256StarStar_methods);
270 class_entry = zend_register_internal_class_ex(&ce, NULL);
271 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
272 zend_class_implements(class_entry, 1, class_entry_Random_Engine);
273
274 return class_entry;
275 }
276
register_class_Random_Engine_Secure(zend_class_entry * class_entry_Random_CryptoSafeEngine)277 static zend_class_entry *register_class_Random_Engine_Secure(zend_class_entry *class_entry_Random_CryptoSafeEngine)
278 {
279 zend_class_entry ce, *class_entry;
280
281 INIT_NS_CLASS_ENTRY(ce, "Random\\Engine", "Secure", class_Random_Engine_Secure_methods);
282 class_entry = zend_register_internal_class_ex(&ce, NULL);
283 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE;
284 zend_class_implements(class_entry, 1, class_entry_Random_CryptoSafeEngine);
285
286 return class_entry;
287 }
288
register_class_Random_Engine(void)289 static zend_class_entry *register_class_Random_Engine(void)
290 {
291 zend_class_entry ce, *class_entry;
292
293 INIT_NS_CLASS_ENTRY(ce, "Random", "Engine", class_Random_Engine_methods);
294 class_entry = zend_register_internal_interface(&ce);
295
296 return class_entry;
297 }
298
register_class_Random_CryptoSafeEngine(zend_class_entry * class_entry_Random_Engine)299 static zend_class_entry *register_class_Random_CryptoSafeEngine(zend_class_entry *class_entry_Random_Engine)
300 {
301 zend_class_entry ce, *class_entry;
302
303 INIT_NS_CLASS_ENTRY(ce, "Random", "CryptoSafeEngine", class_Random_CryptoSafeEngine_methods);
304 class_entry = zend_register_internal_interface(&ce);
305 zend_class_implements(class_entry, 1, class_entry_Random_Engine);
306
307 return class_entry;
308 }
309
register_class_Random_Randomizer(void)310 static zend_class_entry *register_class_Random_Randomizer(void)
311 {
312 zend_class_entry ce, *class_entry;
313
314 INIT_NS_CLASS_ENTRY(ce, "Random", "Randomizer", class_Random_Randomizer_methods);
315 class_entry = zend_register_internal_class_ex(&ce, NULL);
316 class_entry->ce_flags |= ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES;
317
318 zend_string *property_engine_class_Random_Engine = zend_string_init("Random\\Engine", sizeof("Random\\Engine")-1, 1);
319 zval property_engine_default_value;
320 ZVAL_UNDEF(&property_engine_default_value);
321 zend_string *property_engine_name = zend_string_init("engine", sizeof("engine") - 1, 1);
322 zend_declare_typed_property(class_entry, property_engine_name, &property_engine_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_engine_class_Random_Engine, 0, 0));
323 zend_string_release(property_engine_name);
324
325 return class_entry;
326 }
327
register_class_Random_RandomError(zend_class_entry * class_entry_Error)328 static zend_class_entry *register_class_Random_RandomError(zend_class_entry *class_entry_Error)
329 {
330 zend_class_entry ce, *class_entry;
331
332 INIT_NS_CLASS_ENTRY(ce, "Random", "RandomError", class_Random_RandomError_methods);
333 class_entry = zend_register_internal_class_ex(&ce, class_entry_Error);
334 class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
335
336 return class_entry;
337 }
338
register_class_Random_BrokenRandomEngineError(zend_class_entry * class_entry_Random_RandomError)339 static zend_class_entry *register_class_Random_BrokenRandomEngineError(zend_class_entry *class_entry_Random_RandomError)
340 {
341 zend_class_entry ce, *class_entry;
342
343 INIT_NS_CLASS_ENTRY(ce, "Random", "BrokenRandomEngineError", class_Random_BrokenRandomEngineError_methods);
344 class_entry = zend_register_internal_class_ex(&ce, class_entry_Random_RandomError);
345 class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
346
347 return class_entry;
348 }
349
register_class_Random_RandomException(zend_class_entry * class_entry_Exception)350 static zend_class_entry *register_class_Random_RandomException(zend_class_entry *class_entry_Exception)
351 {
352 zend_class_entry ce, *class_entry;
353
354 INIT_NS_CLASS_ENTRY(ce, "Random", "RandomException", class_Random_RandomException_methods);
355 class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception);
356 class_entry->ce_flags |= ZEND_ACC_NO_DYNAMIC_PROPERTIES;
357
358 return class_entry;
359 }
360