1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: a7b5de3e4868f9a4aef78da6b98bbce882e129a9 */
3
4 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
5 ZEND_END_ARG_INFO()
6
7 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_nullable_array_return, 0, 0, IS_ARRAY, 1)
8 ZEND_END_ARG_INFO()
9
10 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_void_return, 0, 0, IS_VOID, 0)
11 ZEND_END_ARG_INFO()
12
13 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_compile_string, 0, 3, IS_VOID, 0)
14 ZEND_ARG_TYPE_INFO(0, source_string, IS_STRING, 0)
15 ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
16 ZEND_ARG_TYPE_INFO(0, position, IS_LONG, 0)
17 ZEND_END_ARG_INFO()
18
19 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_deprecated, 0, 0, IS_VOID, 0)
20 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg, IS_MIXED, 0, "null")
21 ZEND_END_ARG_INFO()
22
23 #define arginfo_zend_test_deprecated_attr arginfo_zend_test_void_return
24
25 #define arginfo_zend_test_aliased arginfo_zend_test_void_return
26
27 #define arginfo_zend_test_deprecated_aliased arginfo_zend_test_void_return
28
29 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, 0, 1, IS_STRING, 0)
30 ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
31 ZEND_END_ARG_INFO()
32
33 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_VOID, 0)
34 ZEND_ARG_TYPE_INFO(1, str, IS_STRING, 0)
35 ZEND_END_ARG_INFO()
36
37 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_variable, 0, 1, IS_VOID, 0)
38 ZEND_ARG_TYPE_INFO(0, variable, IS_MIXED, 0)
39 ZEND_END_ARG_INFO()
40
41 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_bytes, 0, 0, IS_VOID, 0)
42 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bytes, IS_LONG, 0, "3")
43 ZEND_END_ARG_INFO()
44
45 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_string_or_object, 0, 1, MAY_BE_OBJECT|MAY_BE_STRING)
46 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING, NULL)
47 ZEND_END_ARG_INFO()
48
49 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_string_or_object_or_null, 0, 1, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL)
50 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL, NULL)
51 ZEND_END_ARG_INFO()
52
53 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_zend_string_or_stdclass, 0, 1, stdClass, MAY_BE_STRING)
54 ZEND_ARG_INFO(0, param)
55 ZEND_END_ARG_INFO()
56
57 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_zend_string_or_stdclass_or_null, 0, 1, stdClass, MAY_BE_STRING|MAY_BE_NULL)
58 ZEND_ARG_INFO(0, param)
59 ZEND_END_ARG_INFO()
60
61 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_number_or_string, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE)
62 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE, NULL)
63 ZEND_END_ARG_INFO()
64
65 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_number_or_string_or_null, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL)
66 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, NULL)
67 ZEND_END_ARG_INFO()
68
69 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_iterable, 0, 1, IS_VOID, 0)
70 ZEND_ARG_OBJ_TYPE_MASK(0, arg1, Traversable, MAY_BE_ARRAY, NULL)
71 ZEND_ARG_OBJ_TYPE_MASK(0, arg2, Traversable, MAY_BE_ARRAY|MAY_BE_NULL, "null")
72 ZEND_END_ARG_INFO()
73
74 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_attach, 0, 2, _IS_BOOL, 0)
75 ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
76 ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
77 ZEND_END_ARG_INFO()
78
79 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_remove, 0, 1, _IS_BOOL, 0)
80 ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
81 ZEND_END_ARG_INFO()
82
83 #define arginfo_zend_weakmap_dump arginfo_zend_test_array_return
84
85 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_zend_get_unit_enum, 0, 0, ZendTestUnitEnum, 0)
86 ZEND_END_ARG_INFO()
87
88 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_parameter_with_attribute, 0, 1, IS_LONG, 0)
89 ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
90 ZEND_END_ARG_INFO()
91
92 #define arginfo_zend_test_attribute_with_named_argument arginfo_zend_test_void_return
93
94 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_current_func_name, 0, 0, IS_STRING, 0)
95 ZEND_END_ARG_INFO()
96
97 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_call_method, 0, 2, IS_MIXED, 0)
98 ZEND_ARG_TYPE_MASK(0, obj_or_class, MAY_BE_OBJECT|MAY_BE_STRING, NULL)
99 ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
100 ZEND_ARG_TYPE_INFO(0, arg1, IS_MIXED, 0)
101 ZEND_ARG_TYPE_INFO(0, arg2, IS_MIXED, 0)
102 ZEND_END_ARG_INFO()
103
104 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_object_init_with_constructor, 0, 1, IS_MIXED, 0)
105 ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0)
106 ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0)
107 ZEND_END_ARG_INFO()
108
109 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_ini_parse_quantity, 0, 1, IS_LONG, 0)
110 ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
111 ZEND_END_ARG_INFO()
112
113 #define arginfo_zend_test_zend_ini_parse_uquantity arginfo_zend_test_zend_ini_parse_quantity
114
115 #define arginfo_zend_test_zend_ini_str arginfo_zend_get_current_func_name
116
117 #if defined(ZEND_CHECK_STACK_LIMIT)
118 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_call_stack_get, 0, 0, IS_ARRAY, 1)
119 ZEND_END_ARG_INFO()
120
121 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_call_stack_use_all, 0, 0, IS_LONG, 0)
122 ZEND_END_ARG_INFO()
123 #endif
124
125 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_string_marked_as_valid_utf8, 0, 1, _IS_BOOL, 0)
126 ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
127 ZEND_END_ARG_INFO()
128
129 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_map_ptr_last, 0, 0, IS_LONG, 0)
130 ZEND_END_ARG_INFO()
131
132 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_crash, 0, 0, IS_VOID, 0)
133 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 1, "null")
134 ZEND_END_ARG_INFO()
135
136 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_fill_packed_array, 0, 1, IS_VOID, 0)
137 ZEND_ARG_TYPE_INFO(1, array, IS_ARRAY, 0)
138 ZEND_END_ARG_INFO()
139
140 ZEND_BEGIN_ARG_INFO_EX(arginfo_zend_test_create_throwing_resource, 0, 0, 0)
141 ZEND_END_ARG_INFO()
142
143 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_get_open_basedir, 0, 0, IS_STRING, 1)
144 ZEND_END_ARG_INFO()
145
146 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
147 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global_state, 0, 0, IS_VOID, 0)
148 ZEND_END_ARG_INFO()
149 #endif
150
151 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_pcre_bundled, 0, 0, _IS_BOOL, 0)
152 ZEND_END_ARG_INFO()
153
154 #if defined(PHP_WIN32)
155 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_set_fmode, 0, 1, IS_VOID, 0)
156 ZEND_ARG_TYPE_INFO(0, binary, _IS_BOOL, 0)
157 ZEND_END_ARG_INFO()
158 #endif
159
160 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_cast_fread, 0, 1, IS_VOID, 0)
161 ZEND_ARG_INFO(0, stream)
162 ZEND_END_ARG_INFO()
163
164 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_zend_ptr, 0, 1, _IS_BOOL, 0)
165 ZEND_ARG_TYPE_INFO(0, addr, IS_LONG, 0)
166 ZEND_END_ARG_INFO()
167
168 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_log_err_debug, 0, 1, IS_VOID, 0)
169 ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
170 ZEND_END_ARG_INFO()
171
172 #define arginfo_ZendTestNS2_namespaced_func arginfo_zend_test_is_pcre_bundled
173
174 #define arginfo_ZendTestNS2_namespaced_deprecated_func arginfo_zend_test_void_return
175
176 #define arginfo_ZendTestNS2_namespaced_aliased_func arginfo_zend_test_void_return
177
178 #define arginfo_ZendTestNS2_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
179
180 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_zend_test_is_pcre_bundled
181
182 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func arginfo_zend_test_void_return
183
184 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func arginfo_zend_test_void_return
185
186 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
187
188 #define arginfo_class__ZendTestClass_is_object arginfo_zend_get_map_ptr_last
189
190 #define arginfo_class__ZendTestClass___toString arginfo_zend_get_current_func_name
191
192 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_returnsStatic, 0, 0, IS_STATIC, 0)
193 ZEND_END_ARG_INFO()
194
195 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestClass_returnsThrowable, 0, 0, Throwable, 0)
196 ZEND_END_ARG_INFO()
197
198 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_variadicTest, 0, 0, IS_STATIC, 0)
199 ZEND_ARG_VARIADIC_OBJ_TYPE_MASK(0, elements, Iterator, MAY_BE_STRING)
200 ZEND_END_ARG_INFO()
201
202 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_takesUnionType, 0, 1, IS_VOID, 0)
203 ZEND_ARG_OBJ_TYPE_MASK(0, arg, stdclass|Iterator, 0, NULL)
204 ZEND_END_ARG_INFO()
205
206 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestMagicCall___call, 0, 2, IS_MIXED, 0)
207 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
208 ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
209 ZEND_END_ARG_INFO()
210
211 #define arginfo_class__ZendTestMagicCallForward___call arginfo_class__ZendTestMagicCall___call
212
213 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
214 ZEND_END_ARG_INFO()
215
216 #define arginfo_class_ZendAttributeTest_testMethod arginfo_zend_test_is_pcre_bundled
217
218 #define arginfo_class__ZendTestTrait_testMethod arginfo_zend_test_is_pcre_bundled
219
220 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestAttributeWithArguments___construct, 0, 0, 1)
221 ZEND_ARG_TYPE_INFO(0, arg, IS_MIXED, 0)
222 ZEND_END_ARG_INFO()
223
224 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
225 ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
226 ZEND_END_ARG_INFO()
227
228 #define arginfo_class_ZendTestPropertyAttribute___construct arginfo_class_ZendTestParameterAttribute___construct
229
230 #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override arginfo_zend_test_parameter_with_attribute
231
232 #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
233
234 #define arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
235
236 #define arginfo_class_ZendTestForbidDynamicCall_call arginfo_zend_test_void_return
237
238 #define arginfo_class_ZendTestForbidDynamicCall_callStatic arginfo_zend_test_void_return
239
240 #if (PHP_VERSION_ID >= 80100)
241 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZendTestNS_Foo_method, 0, 0, IS_LONG, 0)
242 #else
243 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestNS_Foo_method, 0, 0, 0)
244 #endif
245 ZEND_END_ARG_INFO()
246
247 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ZendTestNS_UnlikelyCompileError_method, 0, 0, ZendTestNS\\\125nlikelyCompileError, 1)
248 ZEND_END_ARG_INFO()
249
250 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ZendTestNS_NotUnlikelyCompileError_method, 0, 0, ZendTestNS\\\116otUnlikelyCompileError, 1)
251 ZEND_END_ARG_INFO()
252
253 #define arginfo_class_ZendTestNS2_Foo_method arginfo_zend_test_void_return
254
255 #define arginfo_class_ZendTestNS2_ZendSubNS_Foo_method arginfo_zend_test_void_return
256
257 static ZEND_FUNCTION(zend_test_array_return);
258 static ZEND_FUNCTION(zend_test_nullable_array_return);
259 static ZEND_FUNCTION(zend_test_void_return);
260 static ZEND_FUNCTION(zend_test_compile_string);
261 static ZEND_FUNCTION(zend_test_deprecated);
262 static ZEND_FUNCTION(zend_test_deprecated_attr);
263 static ZEND_FUNCTION(zend_create_unterminated_string);
264 static ZEND_FUNCTION(zend_terminate_string);
265 static ZEND_FUNCTION(zend_leak_variable);
266 static ZEND_FUNCTION(zend_leak_bytes);
267 static ZEND_FUNCTION(zend_string_or_object);
268 static ZEND_FUNCTION(zend_string_or_object_or_null);
269 static ZEND_FUNCTION(zend_string_or_stdclass);
270 static ZEND_FUNCTION(zend_string_or_stdclass_or_null);
271 static ZEND_FUNCTION(zend_number_or_string);
272 static ZEND_FUNCTION(zend_number_or_string_or_null);
273 static ZEND_FUNCTION(zend_iterable);
274 static ZEND_FUNCTION(zend_weakmap_attach);
275 static ZEND_FUNCTION(zend_weakmap_remove);
276 static ZEND_FUNCTION(zend_weakmap_dump);
277 static ZEND_FUNCTION(zend_get_unit_enum);
278 static ZEND_FUNCTION(zend_test_parameter_with_attribute);
279 static ZEND_FUNCTION(zend_test_attribute_with_named_argument);
280 static ZEND_FUNCTION(zend_get_current_func_name);
281 static ZEND_FUNCTION(zend_call_method);
282 static ZEND_FUNCTION(zend_object_init_with_constructor);
283 static ZEND_FUNCTION(zend_test_zend_ini_parse_quantity);
284 static ZEND_FUNCTION(zend_test_zend_ini_parse_uquantity);
285 static ZEND_FUNCTION(zend_test_zend_ini_str);
286 #if defined(ZEND_CHECK_STACK_LIMIT)
287 static ZEND_FUNCTION(zend_test_zend_call_stack_get);
288 static ZEND_FUNCTION(zend_test_zend_call_stack_use_all);
289 #endif
290 static ZEND_FUNCTION(zend_test_is_string_marked_as_valid_utf8);
291 static ZEND_FUNCTION(zend_get_map_ptr_last);
292 static ZEND_FUNCTION(zend_test_crash);
293 static ZEND_FUNCTION(zend_test_fill_packed_array);
294 static ZEND_FUNCTION(zend_test_create_throwing_resource);
295 static ZEND_FUNCTION(get_open_basedir);
296 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
297 static ZEND_FUNCTION(zend_test_override_libxml_global_state);
298 #endif
299 static ZEND_FUNCTION(zend_test_is_pcre_bundled);
300 #if defined(PHP_WIN32)
301 static ZEND_FUNCTION(zend_test_set_fmode);
302 #endif
303 static ZEND_FUNCTION(zend_test_cast_fread);
304 static ZEND_FUNCTION(zend_test_is_zend_ptr);
305 static ZEND_FUNCTION(zend_test_log_err_debug);
306 static ZEND_FUNCTION(ZendTestNS2_namespaced_func);
307 static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func);
308 static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func);
309 static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_deprecated_func);
310 static ZEND_METHOD(_ZendTestClass, is_object);
311 static ZEND_METHOD(_ZendTestClass, __toString);
312 static ZEND_METHOD(_ZendTestClass, returnsStatic);
313 static ZEND_METHOD(_ZendTestClass, returnsThrowable);
314 static ZEND_METHOD(_ZendTestClass, variadicTest);
315 static ZEND_METHOD(_ZendTestClass, takesUnionType);
316 static ZEND_METHOD(_ZendTestMagicCall, __call);
317 static ZEND_METHOD(_ZendTestMagicCallForward, __call);
318 static ZEND_METHOD(_ZendTestChildClass, returnsThrowable);
319 static ZEND_METHOD(ZendAttributeTest, testMethod);
320 static ZEND_METHOD(_ZendTestTrait, testMethod);
321 static ZEND_METHOD(ZendTestAttributeWithArguments, __construct);
322 static ZEND_METHOD(ZendTestParameterAttribute, __construct);
323 static ZEND_METHOD(ZendTestPropertyAttribute, __construct);
324 static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, no_override);
325 static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, override);
326 static ZEND_METHOD(ZendTestChildClassWithMethodWithParameterAttribute, override);
327 static ZEND_METHOD(ZendTestForbidDynamicCall, call);
328 static ZEND_METHOD(ZendTestForbidDynamicCall, callStatic);
329 static ZEND_METHOD(ZendTestNS_Foo, method);
330 static ZEND_METHOD(ZendTestNS_UnlikelyCompileError, method);
331 static ZEND_METHOD(ZendTestNS_NotUnlikelyCompileError, method);
332 static ZEND_METHOD(ZendTestNS2_Foo, method);
333 static ZEND_METHOD(ZendTestNS2_ZendSubNS_Foo, method);
334
335 static const zend_function_entry ext_functions[] = {
336 ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return)
337 #if (PHP_VERSION_ID >= 80400)
338 ZEND_RAW_FENTRY("zend_test_nullable_array_return", zif_zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return, ZEND_ACC_COMPILE_TIME_EVAL, NULL, "/**\n * \"Lorem ipsum\"\n * @see https://www.php.net\n * @since 8.3\n */")
339 #else
340 #if (PHP_VERSION_ID >= 80200)
341 ZEND_RAW_FENTRY("zend_test_nullable_array_return", zif_zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return, ZEND_ACC_COMPILE_TIME_EVAL)
342 #elif (PHP_VERSION_ID >= 80000)
343 ZEND_RAW_FENTRY("zend_test_nullable_array_return", zif_zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return, 0)
344 #endif
345 #endif
346 ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return)
347 ZEND_FE(zend_test_compile_string, arginfo_zend_test_compile_string)
348 #if (PHP_VERSION_ID >= 80400)
349 ZEND_RAW_FENTRY("zend_test_deprecated", zif_zend_test_deprecated, arginfo_zend_test_deprecated, ZEND_ACC_DEPRECATED, NULL, NULL)
350 #else
351 ZEND_RAW_FENTRY("zend_test_deprecated", zif_zend_test_deprecated, arginfo_zend_test_deprecated, ZEND_ACC_DEPRECATED)
352 #endif
353 #if (PHP_VERSION_ID >= 80400)
354 ZEND_RAW_FENTRY("zend_test_deprecated_attr", zif_zend_test_deprecated_attr, arginfo_zend_test_deprecated_attr, ZEND_ACC_DEPRECATED, NULL, NULL)
355 #else
356 ZEND_RAW_FENTRY("zend_test_deprecated_attr", zif_zend_test_deprecated_attr, arginfo_zend_test_deprecated_attr, ZEND_ACC_DEPRECATED)
357 #endif
358 #if (PHP_VERSION_ID >= 80400)
359 ZEND_RAW_FENTRY("zend_test_aliased", zif_zend_test_void_return, arginfo_zend_test_aliased, 0, NULL, NULL)
360 #else
361 ZEND_RAW_FENTRY("zend_test_aliased", zif_zend_test_void_return, arginfo_zend_test_aliased, 0)
362 #endif
363 #if (PHP_VERSION_ID >= 80400)
364 ZEND_RAW_FENTRY("zend_test_deprecated_aliased", zif_zend_test_void_return, arginfo_zend_test_deprecated_aliased, ZEND_ACC_DEPRECATED, NULL, NULL)
365 #else
366 ZEND_RAW_FENTRY("zend_test_deprecated_aliased", zif_zend_test_void_return, arginfo_zend_test_deprecated_aliased, ZEND_ACC_DEPRECATED)
367 #endif
368 ZEND_FE(zend_create_unterminated_string, arginfo_zend_create_unterminated_string)
369 ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string)
370 ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable)
371 ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes)
372 ZEND_FE(zend_string_or_object, arginfo_zend_string_or_object)
373 ZEND_FE(zend_string_or_object_or_null, arginfo_zend_string_or_object_or_null)
374 ZEND_FE(zend_string_or_stdclass, arginfo_zend_string_or_stdclass)
375 ZEND_FE(zend_string_or_stdclass_or_null, arginfo_zend_string_or_stdclass_or_null)
376 ZEND_FE(zend_number_or_string, arginfo_zend_number_or_string)
377 ZEND_FE(zend_number_or_string_or_null, arginfo_zend_number_or_string_or_null)
378 ZEND_FE(zend_iterable, arginfo_zend_iterable)
379 ZEND_FE(zend_weakmap_attach, arginfo_zend_weakmap_attach)
380 ZEND_FE(zend_weakmap_remove, arginfo_zend_weakmap_remove)
381 ZEND_FE(zend_weakmap_dump, arginfo_zend_weakmap_dump)
382 ZEND_FE(zend_get_unit_enum, arginfo_zend_get_unit_enum)
383 ZEND_FE(zend_test_parameter_with_attribute, arginfo_zend_test_parameter_with_attribute)
384 ZEND_FE(zend_test_attribute_with_named_argument, arginfo_zend_test_attribute_with_named_argument)
385 ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name)
386 ZEND_FE(zend_call_method, arginfo_zend_call_method)
387 ZEND_FE(zend_object_init_with_constructor, arginfo_zend_object_init_with_constructor)
388 ZEND_FE(zend_test_zend_ini_parse_quantity, arginfo_zend_test_zend_ini_parse_quantity)
389 ZEND_FE(zend_test_zend_ini_parse_uquantity, arginfo_zend_test_zend_ini_parse_uquantity)
390 ZEND_FE(zend_test_zend_ini_str, arginfo_zend_test_zend_ini_str)
391 #if defined(ZEND_CHECK_STACK_LIMIT)
392 ZEND_FE(zend_test_zend_call_stack_get, arginfo_zend_test_zend_call_stack_get)
393 ZEND_FE(zend_test_zend_call_stack_use_all, arginfo_zend_test_zend_call_stack_use_all)
394 #endif
395 ZEND_FE(zend_test_is_string_marked_as_valid_utf8, arginfo_zend_test_is_string_marked_as_valid_utf8)
396 ZEND_FE(zend_get_map_ptr_last, arginfo_zend_get_map_ptr_last)
397 ZEND_FE(zend_test_crash, arginfo_zend_test_crash)
398 ZEND_FE(zend_test_fill_packed_array, arginfo_zend_test_fill_packed_array)
399 ZEND_FE(zend_test_create_throwing_resource, arginfo_zend_test_create_throwing_resource)
400 ZEND_FE(get_open_basedir, arginfo_get_open_basedir)
401 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
402 ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state)
403 #endif
404 ZEND_FE(zend_test_is_pcre_bundled, arginfo_zend_test_is_pcre_bundled)
405 #if defined(PHP_WIN32)
406 ZEND_FE(zend_test_set_fmode, arginfo_zend_test_set_fmode)
407 #endif
408 ZEND_FE(zend_test_cast_fread, arginfo_zend_test_cast_fread)
409 ZEND_FE(zend_test_is_zend_ptr, arginfo_zend_test_is_zend_ptr)
410 ZEND_FE(zend_test_log_err_debug, arginfo_zend_test_log_err_debug)
411 #if (PHP_VERSION_ID >= 80400)
412 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_func"), zif_ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func, 0, NULL, NULL)
413 #else
414 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_func"), zif_ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func, 0)
415 #endif
416 #if (PHP_VERSION_ID >= 80400)
417 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_deprecated_func"), zif_ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func, ZEND_ACC_DEPRECATED, NULL, NULL)
418 #else
419 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_deprecated_func"), zif_ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func, ZEND_ACC_DEPRECATED)
420 #endif
421 #if (PHP_VERSION_ID >= 80400)
422 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func, 0, NULL, NULL)
423 #else
424 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func, 0)
425 #endif
426 #if (PHP_VERSION_ID >= 80400)
427 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_deprecated_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_namespaced_deprecated_aliased_func, ZEND_ACC_DEPRECATED, NULL, NULL)
428 #else
429 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2", "namespaced_deprecated_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_namespaced_deprecated_aliased_func, ZEND_ACC_DEPRECATED)
430 #endif
431 #if (PHP_VERSION_ID >= 80400)
432 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_func"), zif_ZendTestNS2_ZendSubNS_namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, NULL, NULL)
433 #else
434 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_func"), zif_ZendTestNS2_ZendSubNS_namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0)
435 #endif
436 #if (PHP_VERSION_ID >= 80400)
437 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_deprecated_func"), zif_ZendTestNS2_ZendSubNS_namespaced_deprecated_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func, ZEND_ACC_DEPRECATED, NULL, NULL)
438 #else
439 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_deprecated_func"), zif_ZendTestNS2_ZendSubNS_namespaced_deprecated_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func, ZEND_ACC_DEPRECATED)
440 #endif
441 #if (PHP_VERSION_ID >= 80400)
442 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func, 0, NULL, NULL)
443 #else
444 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func, 0)
445 #endif
446 #if (PHP_VERSION_ID >= 80400)
447 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_deprecated_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func, ZEND_ACC_DEPRECATED, NULL, NULL)
448 #else
449 ZEND_RAW_FENTRY(ZEND_NS_NAME("ZendTestNS2\\ZendSubNS", "namespaced_deprecated_aliased_func"), zif_zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func, ZEND_ACC_DEPRECATED)
450 #endif
451 ZEND_FE_END
452 };
453
454 static const zend_function_entry class__ZendTestClass_methods[] = {
455 ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
456 ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
457 ZEND_ME(_ZendTestClass, returnsStatic, arginfo_class__ZendTestClass_returnsStatic, ZEND_ACC_PUBLIC)
458 ZEND_ME(_ZendTestClass, returnsThrowable, arginfo_class__ZendTestClass_returnsThrowable, ZEND_ACC_PUBLIC)
459 ZEND_ME(_ZendTestClass, variadicTest, arginfo_class__ZendTestClass_variadicTest, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
460 ZEND_ME(_ZendTestClass, takesUnionType, arginfo_class__ZendTestClass_takesUnionType, ZEND_ACC_PUBLIC)
461 ZEND_FE_END
462 };
463
464 static const zend_function_entry class__ZendTestMagicCall_methods[] = {
465 ZEND_ME(_ZendTestMagicCall, __call, arginfo_class__ZendTestMagicCall___call, ZEND_ACC_PUBLIC)
466 ZEND_FE_END
467 };
468
469 static const zend_function_entry class__ZendTestMagicCallForward_methods[] = {
470 ZEND_ME(_ZendTestMagicCallForward, __call, arginfo_class__ZendTestMagicCallForward___call, ZEND_ACC_PUBLIC)
471 ZEND_FE_END
472 };
473
474 static const zend_function_entry class__ZendTestChildClass_methods[] = {
475 ZEND_ME(_ZendTestChildClass, returnsThrowable, arginfo_class__ZendTestChildClass_returnsThrowable, ZEND_ACC_PUBLIC)
476 ZEND_FE_END
477 };
478
479 static const zend_function_entry class_ZendAttributeTest_methods[] = {
480 ZEND_ME(ZendAttributeTest, testMethod, arginfo_class_ZendAttributeTest_testMethod, ZEND_ACC_PUBLIC)
481 ZEND_FE_END
482 };
483
484 static const zend_function_entry class__ZendTestTrait_methods[] = {
485 ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC)
486 ZEND_FE_END
487 };
488
489 static const zend_function_entry class_ZendTestAttributeWithArguments_methods[] = {
490 ZEND_ME(ZendTestAttributeWithArguments, __construct, arginfo_class_ZendTestAttributeWithArguments___construct, ZEND_ACC_PUBLIC)
491 ZEND_FE_END
492 };
493
494 static const zend_function_entry class_ZendTestParameterAttribute_methods[] = {
495 ZEND_ME(ZendTestParameterAttribute, __construct, arginfo_class_ZendTestParameterAttribute___construct, ZEND_ACC_PUBLIC)
496 ZEND_FE_END
497 };
498
499 static const zend_function_entry class_ZendTestPropertyAttribute_methods[] = {
500 ZEND_ME(ZendTestPropertyAttribute, __construct, arginfo_class_ZendTestPropertyAttribute___construct, ZEND_ACC_PUBLIC)
501 ZEND_FE_END
502 };
503
504 static const zend_function_entry class_ZendTestClassWithMethodWithParameterAttribute_methods[] = {
505 ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, no_override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
506 ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
507 ZEND_FE_END
508 };
509
510 static const zend_function_entry class_ZendTestChildClassWithMethodWithParameterAttribute_methods[] = {
511 ZEND_ME(ZendTestChildClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
512 ZEND_FE_END
513 };
514
515 static const zend_function_entry class_ZendTestForbidDynamicCall_methods[] = {
516 ZEND_ME(ZendTestForbidDynamicCall, call, arginfo_class_ZendTestForbidDynamicCall_call, ZEND_ACC_PUBLIC)
517 ZEND_ME(ZendTestForbidDynamicCall, callStatic, arginfo_class_ZendTestForbidDynamicCall_callStatic, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
518 ZEND_FE_END
519 };
520
521 static const zend_function_entry class_ZendTestNS_Foo_methods[] = {
522 ZEND_ME(ZendTestNS_Foo, method, arginfo_class_ZendTestNS_Foo_method, ZEND_ACC_PUBLIC)
523 ZEND_FE_END
524 };
525
526 static const zend_function_entry class_ZendTestNS_UnlikelyCompileError_methods[] = {
527 ZEND_ME(ZendTestNS_UnlikelyCompileError, method, arginfo_class_ZendTestNS_UnlikelyCompileError_method, ZEND_ACC_PUBLIC)
528 ZEND_FE_END
529 };
530
531 static const zend_function_entry class_ZendTestNS_NotUnlikelyCompileError_methods[] = {
532 ZEND_ME(ZendTestNS_NotUnlikelyCompileError, method, arginfo_class_ZendTestNS_NotUnlikelyCompileError_method, ZEND_ACC_PUBLIC)
533 ZEND_FE_END
534 };
535
536 static const zend_function_entry class_ZendTestNS2_Foo_methods[] = {
537 ZEND_ME(ZendTestNS2_Foo, method, arginfo_class_ZendTestNS2_Foo_method, ZEND_ACC_PUBLIC)
538 ZEND_FE_END
539 };
540
541 static const zend_function_entry class_ZendTestNS2_ZendSubNS_Foo_methods[] = {
542 ZEND_ME(ZendTestNS2_ZendSubNS_Foo, method, arginfo_class_ZendTestNS2_ZendSubNS_Foo_method, ZEND_ACC_PUBLIC)
543 ZEND_FE_END
544 };
545
register_test_symbols(int module_number)546 static void register_test_symbols(int module_number)
547 {
548 REGISTER_LONG_CONSTANT("ZEND_TEST_DEPRECATED", 42, CONST_PERSISTENT | CONST_DEPRECATED);
549 REGISTER_STRING_CONSTANT("ZEND_CONSTANT_A", "global", CONST_PERSISTENT);
550 REGISTER_STRING_CONSTANT("ZendTestNS2\\ZEND_CONSTANT_A", "namespaced", CONST_PERSISTENT);
551 REGISTER_STRING_CONSTANT("ZendTestNS2\\ZendSubNS\\ZEND_CONSTANT_A", "namespaced", CONST_PERSISTENT);
552
553
554 zend_string *attribute_name_Deprecated_func_zend_test_deprecated_attr_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
555 zend_attribute *attribute_Deprecated_func_zend_test_deprecated_attr_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_deprecated_attr", sizeof("zend_test_deprecated_attr") - 1), attribute_name_Deprecated_func_zend_test_deprecated_attr_0, 1);
556 zend_string_release(attribute_name_Deprecated_func_zend_test_deprecated_attr_0);
557 zval attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0;
558 zend_string *attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str = zend_string_init("custom message", strlen("custom message"), 1);
559 ZVAL_STR(&attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0, attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0_str);
560 ZVAL_COPY_VALUE(&attribute_Deprecated_func_zend_test_deprecated_attr_0->args[0].value, &attribute_Deprecated_func_zend_test_deprecated_attr_0_arg0);
561 attribute_Deprecated_func_zend_test_deprecated_attr_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
562
563 zend_string *attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1);
564 zend_attribute *attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_parameter_with_attribute", sizeof("zend_test_parameter_with_attribute") - 1), 0, attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0, 1);
565 zend_string_release(attribute_name_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0);
566 zval attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0;
567 zend_string *attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0_str = zend_string_init("value1", strlen("value1"), 1);
568 ZVAL_STR(&attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0, attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0_str);
569 ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0->args[0].value, &attribute_ZendTestParameterAttribute_func_zend_test_parameter_with_attribute_arg0_0_arg0);
570
571 zend_string *attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0 = zend_string_init_interned("ZendTestAttributeWithArguments", sizeof("ZendTestAttributeWithArguments") - 1, 1);
572 zend_attribute *attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0 = zend_add_function_attribute(zend_hash_str_find_ptr(CG(function_table), "zend_test_attribute_with_named_argument", sizeof("zend_test_attribute_with_named_argument") - 1), attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0, 1);
573 zend_string_release(attribute_name_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0);
574 zval attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0;
575 zend_string *attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0_str = zend_string_init("foo", strlen("foo"), 1);
576 ZVAL_STR(&attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0, attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0_str);
577 ZVAL_COPY_VALUE(&attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0->args[0].value, &attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0_arg0);
578 attribute_ZendTestAttributeWithArguments_func_zend_test_attribute_with_named_argument_0->args[0].name = zend_string_init_interned("arg", sizeof("arg") - 1, 1);
579 }
580
register_class__ZendTestInterface(void)581 static zend_class_entry *register_class__ZendTestInterface(void)
582 {
583 zend_class_entry ce, *class_entry;
584
585 INIT_CLASS_ENTRY(ce, "_ZendTestInterface", NULL);
586 class_entry = zend_register_internal_interface(&ce);
587
588 zval const_DUMMY_value;
589 ZVAL_LONG(&const_DUMMY_value, 0);
590 zend_string *const_DUMMY_name = zend_string_init_interned("DUMMY", sizeof("DUMMY") - 1, 1);
591 zend_string *const_DUMMY_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://www.php.net\n * @since 8.2\n */", 98, 1);
592 zend_declare_class_constant_ex(class_entry, const_DUMMY_name, &const_DUMMY_value, ZEND_ACC_PUBLIC, const_DUMMY_comment);
593 zend_string_release(const_DUMMY_name);
594
595 return class_entry;
596 }
597
register_class__ZendTestClass(zend_class_entry * class_entry__ZendTestInterface)598 static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_entry__ZendTestInterface)
599 {
600 zend_class_entry ce, *class_entry;
601
602 INIT_CLASS_ENTRY(ce, "_ZendTestClass", class__ZendTestClass_methods);
603 #if (PHP_VERSION_ID >= 80400)
604 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
605 #else
606 class_entry = zend_register_internal_class_ex(&ce, NULL);
607 #endif
608 zend_class_implements(class_entry, 1, class_entry__ZendTestInterface);
609 zend_register_class_alias("_ZendTestClassAlias", class_entry);
610
611 zval const_TYPED_CLASS_CONST1_value;
612 ZVAL_EMPTY_ARRAY(&const_TYPED_CLASS_CONST1_value);
613 zend_string *const_TYPED_CLASS_CONST1_name = zend_string_init_interned("TYPED_CLASS_CONST1", sizeof("TYPED_CLASS_CONST1") - 1, 1);
614 #if (PHP_VERSION_ID >= 80300)
615 zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST1_name, &const_TYPED_CLASS_CONST1_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
616 #else
617 zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST1_name, &const_TYPED_CLASS_CONST1_value, ZEND_ACC_PUBLIC, NULL);
618 #endif
619 zend_string_release(const_TYPED_CLASS_CONST1_name);
620
621 zval const_TYPED_CLASS_CONST2_value;
622 ZVAL_LONG(&const_TYPED_CLASS_CONST2_value, 42);
623 zend_string *const_TYPED_CLASS_CONST2_name = zend_string_init_interned("TYPED_CLASS_CONST2", sizeof("TYPED_CLASS_CONST2") - 1, 1);
624 #if (PHP_VERSION_ID >= 80300)
625 zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST2_name, &const_TYPED_CLASS_CONST2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_ARRAY));
626 #else
627 zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST2_name, &const_TYPED_CLASS_CONST2_value, ZEND_ACC_PUBLIC, NULL);
628 #endif
629 zend_string_release(const_TYPED_CLASS_CONST2_name);
630
631 zval const_TYPED_CLASS_CONST3_value;
632 ZVAL_LONG(&const_TYPED_CLASS_CONST3_value, 1);
633 zend_string *const_TYPED_CLASS_CONST3_name = zend_string_init_interned("TYPED_CLASS_CONST3", sizeof("TYPED_CLASS_CONST3") - 1, 1);
634 #if (PHP_VERSION_ID >= 80300)
635 zend_declare_typed_class_constant(class_entry, const_TYPED_CLASS_CONST3_name, &const_TYPED_CLASS_CONST3_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_STRING));
636 #else
637 zend_declare_class_constant_ex(class_entry, const_TYPED_CLASS_CONST3_name, &const_TYPED_CLASS_CONST3_value, ZEND_ACC_PUBLIC, NULL);
638 #endif
639 zend_string_release(const_TYPED_CLASS_CONST3_name);
640
641 zval const_ZEND_TEST_DEPRECATED_value;
642 ZVAL_LONG(&const_ZEND_TEST_DEPRECATED_value, 42);
643 zend_string *const_ZEND_TEST_DEPRECATED_name = zend_string_init_interned("ZEND_TEST_DEPRECATED", sizeof("ZEND_TEST_DEPRECATED") - 1, 1);
644 #if (PHP_VERSION_ID >= 80300)
645 zend_declare_typed_class_constant(class_entry, const_ZEND_TEST_DEPRECATED_name, &const_ZEND_TEST_DEPRECATED_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
646 #else
647 zend_declare_class_constant_ex(class_entry, const_ZEND_TEST_DEPRECATED_name, &const_ZEND_TEST_DEPRECATED_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL);
648 #endif
649 zend_string_release(const_ZEND_TEST_DEPRECATED_name);
650
651 zval const_ZEND_TEST_DEPRECATED_ATTR_value;
652 ZVAL_LONG(&const_ZEND_TEST_DEPRECATED_ATTR_value, 42);
653 zend_string *const_ZEND_TEST_DEPRECATED_ATTR_name = zend_string_init_interned("ZEND_TEST_DEPRECATED_ATTR", sizeof("ZEND_TEST_DEPRECATED_ATTR") - 1, 1);
654 #if (PHP_VERSION_ID >= 80300)
655 zend_class_constant *const_ZEND_TEST_DEPRECATED_ATTR = zend_declare_typed_class_constant(class_entry, const_ZEND_TEST_DEPRECATED_ATTR_name, &const_ZEND_TEST_DEPRECATED_ATTR_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
656 #else
657 zend_class_constant *const_ZEND_TEST_DEPRECATED_ATTR = zend_declare_class_constant_ex(class_entry, const_ZEND_TEST_DEPRECATED_ATTR_name, &const_ZEND_TEST_DEPRECATED_ATTR_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL);
658 #endif
659 zend_string_release(const_ZEND_TEST_DEPRECATED_ATTR_name);
660
661 zval property__StaticProp_default_value;
662 ZVAL_NULL(&property__StaticProp_default_value);
663 zend_string *property__StaticProp_name = zend_string_init("_StaticProp", sizeof("_StaticProp") - 1, 1);
664 zend_declare_typed_property(class_entry, property__StaticProp_name, &property__StaticProp_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC, NULL, (zend_type) ZEND_TYPE_INIT_NONE(0));
665 zend_string_release(property__StaticProp_name);
666
667 zval property_staticIntProp_default_value;
668 ZVAL_LONG(&property_staticIntProp_default_value, 123);
669 zend_string *property_staticIntProp_name = zend_string_init("staticIntProp", sizeof("staticIntProp") - 1, 1);
670 zend_declare_typed_property(class_entry, property_staticIntProp_name, &property_staticIntProp_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
671 zend_string_release(property_staticIntProp_name);
672
673 zval property_intProp_default_value;
674 ZVAL_LONG(&property_intProp_default_value, 123);
675 zend_string *property_intProp_name = zend_string_init("intProp", sizeof("intProp") - 1, 1);
676 zend_declare_typed_property(class_entry, property_intProp_name, &property_intProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
677 zend_string_release(property_intProp_name);
678
679 zval property_classProp_default_value;
680 ZVAL_NULL(&property_classProp_default_value);
681 zend_string *property_classProp_name = zend_string_init("classProp", sizeof("classProp") - 1, 1);
682 zend_string *property_classProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass")-1, 1);
683 zend_declare_typed_property(class_entry, property_classProp_name, &property_classProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_classProp_class_stdClass, 0, MAY_BE_NULL));
684 zend_string_release(property_classProp_name);
685
686 zval property_classUnionProp_default_value;
687 ZVAL_NULL(&property_classUnionProp_default_value);
688 zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
689 zend_string *property_classUnionProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass") - 1, 1);
690 zend_string *property_classUnionProp_class_Iterator = zend_string_init("Iterator", sizeof("Iterator") - 1, 1);
691 zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
692 property_classUnionProp_type_list->num_types = 2;
693 property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_stdClass, 0, 0);
694 property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Iterator, 0, 0);
695 zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, MAY_BE_NULL);
696 zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
697 zend_string_release(property_classUnionProp_name);
698
699 zval property_classIntersectionProp_default_value;
700 ZVAL_UNDEF(&property_classIntersectionProp_default_value);
701 zend_string *property_classIntersectionProp_name = zend_string_init("classIntersectionProp", sizeof("classIntersectionProp") - 1, 1);
702 zend_string *property_classIntersectionProp_class_Traversable = zend_string_init("Traversable", sizeof("Traversable") - 1, 1);
703 zend_string *property_classIntersectionProp_class_Countable = zend_string_init("Countable", sizeof("Countable") - 1, 1);
704 zend_type_list *property_classIntersectionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
705 property_classIntersectionProp_type_list->num_types = 2;
706 property_classIntersectionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Traversable, 0, 0);
707 property_classIntersectionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Countable, 0, 0);
708 zend_type property_classIntersectionProp_type = ZEND_TYPE_INIT_INTERSECTION(property_classIntersectionProp_type_list, 0);
709 zend_declare_typed_property(class_entry, property_classIntersectionProp_name, &property_classIntersectionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classIntersectionProp_type);
710 zend_string_release(property_classIntersectionProp_name);
711
712 zval property_readonlyProp_default_value;
713 ZVAL_UNDEF(&property_readonlyProp_default_value);
714 zend_string *property_readonlyProp_name = zend_string_init("readonlyProp", sizeof("readonlyProp") - 1, 1);
715 #if (PHP_VERSION_ID >= 80100)
716 zend_declare_typed_property(class_entry, property_readonlyProp_name, &property_readonlyProp_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
717 #elif (PHP_VERSION_ID >= 80000)
718 zend_declare_typed_property(class_entry, property_readonlyProp_name, &property_readonlyProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG));
719 #endif
720 zend_string_release(property_readonlyProp_name);
721
722
723 zend_string *attribute_name_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0 = zend_string_init_interned("Deprecated", sizeof("Deprecated") - 1, 1);
724 zend_attribute *attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0 = zend_add_class_constant_attribute(class_entry, const_ZEND_TEST_DEPRECATED_ATTR, attribute_name_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0, 1);
725 zend_string_release(attribute_name_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0);
726 zval attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0_arg0;
727 zend_string *attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0_arg0_str = zend_string_init("custom message", strlen("custom message"), 1);
728 ZVAL_STR(&attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0_arg0, attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0_arg0_str);
729 ZVAL_COPY_VALUE(&attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0->args[0].value, &attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0_arg0);
730 attribute_Deprecated_const_ZEND_TEST_DEPRECATED_ATTR_0->args[0].name = ZSTR_KNOWN(ZEND_STR_MESSAGE);
731
732 return class_entry;
733 }
734
register_class__ZendTestMagicCall(void)735 static zend_class_entry *register_class__ZendTestMagicCall(void)
736 {
737 zend_class_entry ce, *class_entry;
738
739 INIT_CLASS_ENTRY(ce, "_ZendTestMagicCall", class__ZendTestMagicCall_methods);
740 #if (PHP_VERSION_ID >= 80400)
741 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
742 #else
743 class_entry = zend_register_internal_class_ex(&ce, NULL);
744 #endif
745
746 return class_entry;
747 }
748
register_class__ZendTestMagicCallForward(void)749 static zend_class_entry *register_class__ZendTestMagicCallForward(void)
750 {
751 zend_class_entry ce, *class_entry;
752
753 INIT_CLASS_ENTRY(ce, "_ZendTestMagicCallForward", class__ZendTestMagicCallForward_methods);
754 #if (PHP_VERSION_ID >= 80400)
755 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
756 #else
757 class_entry = zend_register_internal_class_ex(&ce, NULL);
758 #endif
759
760 return class_entry;
761 }
762
register_class__ZendTestChildClass(zend_class_entry * class_entry__ZendTestClass)763 static zend_class_entry *register_class__ZendTestChildClass(zend_class_entry *class_entry__ZendTestClass)
764 {
765 zend_class_entry ce, *class_entry;
766
767 INIT_CLASS_ENTRY(ce, "_ZendTestChildClass", class__ZendTestChildClass_methods);
768 #if (PHP_VERSION_ID >= 80400)
769 class_entry = zend_register_internal_class_with_flags(&ce, class_entry__ZendTestClass, 0);
770 #else
771 class_entry = zend_register_internal_class_ex(&ce, class_entry__ZendTestClass);
772 #endif
773
774 return class_entry;
775 }
776
register_class_ZendAttributeTest(void)777 static zend_class_entry *register_class_ZendAttributeTest(void)
778 {
779 zend_class_entry ce, *class_entry;
780
781 INIT_CLASS_ENTRY(ce, "ZendAttributeTest", class_ZendAttributeTest_methods);
782 #if (PHP_VERSION_ID >= 80400)
783 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
784 #else
785 class_entry = zend_register_internal_class_ex(&ce, NULL);
786 #endif
787
788 zval const_TEST_CONST_value;
789 ZVAL_LONG(&const_TEST_CONST_value, 1);
790 zend_string *const_TEST_CONST_name = zend_string_init_interned("TEST_CONST", sizeof("TEST_CONST") - 1, 1);
791 zend_class_constant *const_TEST_CONST = zend_declare_class_constant_ex(class_entry, const_TEST_CONST_name, &const_TEST_CONST_value, ZEND_ACC_PUBLIC, NULL);
792 zend_string_release(const_TEST_CONST_name);
793
794 zval property_testProp_default_value;
795 ZVAL_NULL(&property_testProp_default_value);
796 zend_string *property_testProp_name = zend_string_init("testProp", sizeof("testProp") - 1, 1);
797 zend_property_info *property_testProp = zend_declare_typed_property(class_entry, property_testProp_name, &property_testProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_NONE(0));
798 zend_string_release(property_testProp_name);
799
800
801 zend_string *attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_0 = zend_string_init_interned("ZendTestRepeatableAttribute", sizeof("ZendTestRepeatableAttribute") - 1, 1);
802 zend_add_class_constant_attribute(class_entry, const_TEST_CONST, attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_0, 0);
803 zend_string_release(attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_0);
804
805 zend_string *attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_1 = zend_string_init_interned("ZendTestRepeatableAttribute", sizeof("ZendTestRepeatableAttribute") - 1, 1);
806 zend_add_class_constant_attribute(class_entry, const_TEST_CONST, attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_1, 0);
807 zend_string_release(attribute_name_ZendTestRepeatableAttribute_const_TEST_CONST_1);
808
809
810 zend_string *attribute_name_ZendTestRepeatableAttribute_property_testProp_0 = zend_string_init_interned("ZendTestRepeatableAttribute", sizeof("ZendTestRepeatableAttribute") - 1, 1);
811 zend_add_property_attribute(class_entry, property_testProp, attribute_name_ZendTestRepeatableAttribute_property_testProp_0, 0);
812 zend_string_release(attribute_name_ZendTestRepeatableAttribute_property_testProp_0);
813
814 zend_string *attribute_name_ZendTestPropertyAttribute_property_testProp_1 = zend_string_init_interned("ZendTestPropertyAttribute", sizeof("ZendTestPropertyAttribute") - 1, 1);
815 zend_attribute *attribute_ZendTestPropertyAttribute_property_testProp_1 = zend_add_property_attribute(class_entry, property_testProp, attribute_name_ZendTestPropertyAttribute_property_testProp_1, 1);
816 zend_string_release(attribute_name_ZendTestPropertyAttribute_property_testProp_1);
817 zval attribute_ZendTestPropertyAttribute_property_testProp_1_arg0;
818 zend_string *attribute_ZendTestPropertyAttribute_property_testProp_1_arg0_str = zend_string_init("testProp", strlen("testProp"), 1);
819 ZVAL_STR(&attribute_ZendTestPropertyAttribute_property_testProp_1_arg0, attribute_ZendTestPropertyAttribute_property_testProp_1_arg0_str);
820 ZVAL_COPY_VALUE(&attribute_ZendTestPropertyAttribute_property_testProp_1->args[0].value, &attribute_ZendTestPropertyAttribute_property_testProp_1_arg0);
821
822
823 zend_string *attribute_name_ZendTestAttribute_func_testmethod_0 = zend_string_init_interned("ZendTestAttribute", sizeof("ZendTestAttribute") - 1, 1);
824 zend_add_function_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "testmethod", sizeof("testmethod") - 1), attribute_name_ZendTestAttribute_func_testmethod_0, 0);
825 zend_string_release(attribute_name_ZendTestAttribute_func_testmethod_0);
826
827 return class_entry;
828 }
829
register_class__ZendTestTrait(void)830 static zend_class_entry *register_class__ZendTestTrait(void)
831 {
832 zend_class_entry ce, *class_entry;
833
834 INIT_CLASS_ENTRY(ce, "_ZendTestTrait", class__ZendTestTrait_methods);
835 #if (PHP_VERSION_ID >= 80400)
836 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_TRAIT);
837 #else
838 class_entry = zend_register_internal_class_ex(&ce, NULL);
839 class_entry->ce_flags |= ZEND_ACC_TRAIT;
840 #endif
841
842 zval property_testProp_default_value;
843 ZVAL_NULL(&property_testProp_default_value);
844 zend_string *property_testProp_name = zend_string_init("testProp", sizeof("testProp") - 1, 1);
845 zend_declare_typed_property(class_entry, property_testProp_name, &property_testProp_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_NONE(0));
846 zend_string_release(property_testProp_name);
847
848 zval property_classUnionProp_default_value;
849 ZVAL_UNDEF(&property_classUnionProp_default_value);
850 zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
851 zend_string *property_classUnionProp_class_Traversable = zend_string_init("Traversable", sizeof("Traversable") - 1, 1);
852 zend_string *property_classUnionProp_class_Countable = zend_string_init("Countable", sizeof("Countable") - 1, 1);
853 zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
854 property_classUnionProp_type_list->num_types = 2;
855 property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Traversable, 0, 0);
856 property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Countable, 0, 0);
857 zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, 0);
858 zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
859 zend_string_release(property_classUnionProp_name);
860
861 return class_entry;
862 }
863
register_class_ZendTestAttribute(void)864 static zend_class_entry *register_class_ZendTestAttribute(void)
865 {
866 zend_class_entry ce, *class_entry;
867
868 INIT_CLASS_ENTRY(ce, "ZendTestAttribute", NULL);
869 #if (PHP_VERSION_ID >= 80400)
870 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
871 #else
872 class_entry = zend_register_internal_class_ex(&ce, NULL);
873 class_entry->ce_flags |= ZEND_ACC_FINAL;
874 #endif
875
876 zend_string *attribute_name_Attribute_class_ZendTestAttribute_0 = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
877 zend_attribute *attribute_Attribute_class_ZendTestAttribute_0 = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestAttribute_0, 1);
878 zend_string_release(attribute_name_Attribute_class_ZendTestAttribute_0);
879 zval attribute_Attribute_class_ZendTestAttribute_0_arg0;
880 ZVAL_LONG(&attribute_Attribute_class_ZendTestAttribute_0_arg0, ZEND_ATTRIBUTE_TARGET_ALL);
881 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestAttribute_0->args[0].value, &attribute_Attribute_class_ZendTestAttribute_0_arg0);
882
883 return class_entry;
884 }
885
register_class_ZendTestAttributeWithArguments(void)886 static zend_class_entry *register_class_ZendTestAttributeWithArguments(void)
887 {
888 zend_class_entry ce, *class_entry;
889
890 INIT_CLASS_ENTRY(ce, "ZendTestAttributeWithArguments", class_ZendTestAttributeWithArguments_methods);
891 #if (PHP_VERSION_ID >= 80400)
892 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
893 #else
894 class_entry = zend_register_internal_class_ex(&ce, NULL);
895 class_entry->ce_flags |= ZEND_ACC_FINAL;
896 #endif
897
898 zval property_arg_default_value;
899 ZVAL_UNDEF(&property_arg_default_value);
900 zend_string *property_arg_name = zend_string_init("arg", sizeof("arg") - 1, 1);
901 #if (PHP_VERSION_ID >= 80100)
902 zend_declare_typed_property(class_entry, property_arg_name, &property_arg_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
903 #elif (PHP_VERSION_ID >= 80000)
904 zend_declare_typed_property(class_entry, property_arg_name, &property_arg_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
905 #endif
906 zend_string_release(property_arg_name);
907
908 zend_string *attribute_name_Attribute_class_ZendTestAttributeWithArguments_0 = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
909 zend_attribute *attribute_Attribute_class_ZendTestAttributeWithArguments_0 = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestAttributeWithArguments_0, 1);
910 zend_string_release(attribute_name_Attribute_class_ZendTestAttributeWithArguments_0);
911 zval attribute_Attribute_class_ZendTestAttributeWithArguments_0_arg0;
912 ZVAL_LONG(&attribute_Attribute_class_ZendTestAttributeWithArguments_0_arg0, ZEND_ATTRIBUTE_TARGET_ALL);
913 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestAttributeWithArguments_0->args[0].value, &attribute_Attribute_class_ZendTestAttributeWithArguments_0_arg0);
914
915 return class_entry;
916 }
917
register_class_ZendTestRepeatableAttribute(void)918 static zend_class_entry *register_class_ZendTestRepeatableAttribute(void)
919 {
920 zend_class_entry ce, *class_entry;
921
922 INIT_CLASS_ENTRY(ce, "ZendTestRepeatableAttribute", NULL);
923 #if (PHP_VERSION_ID >= 80400)
924 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
925 #else
926 class_entry = zend_register_internal_class_ex(&ce, NULL);
927 class_entry->ce_flags |= ZEND_ACC_FINAL;
928 #endif
929
930 zend_string *attribute_name_Attribute_class_ZendTestRepeatableAttribute_0 = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
931 zend_attribute *attribute_Attribute_class_ZendTestRepeatableAttribute_0 = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestRepeatableAttribute_0, 1);
932 zend_string_release(attribute_name_Attribute_class_ZendTestRepeatableAttribute_0);
933 zval attribute_Attribute_class_ZendTestRepeatableAttribute_0_arg0;
934 ZVAL_LONG(&attribute_Attribute_class_ZendTestRepeatableAttribute_0_arg0, ZEND_ATTRIBUTE_TARGET_ALL | ZEND_ATTRIBUTE_IS_REPEATABLE);
935 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestRepeatableAttribute_0->args[0].value, &attribute_Attribute_class_ZendTestRepeatableAttribute_0_arg0);
936
937 return class_entry;
938 }
939
register_class_ZendTestParameterAttribute(void)940 static zend_class_entry *register_class_ZendTestParameterAttribute(void)
941 {
942 zend_class_entry ce, *class_entry;
943
944 INIT_CLASS_ENTRY(ce, "ZendTestParameterAttribute", class_ZendTestParameterAttribute_methods);
945 #if (PHP_VERSION_ID >= 80400)
946 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
947 #else
948 class_entry = zend_register_internal_class_ex(&ce, NULL);
949 class_entry->ce_flags |= ZEND_ACC_FINAL;
950 #endif
951
952 zval property_parameter_default_value;
953 ZVAL_UNDEF(&property_parameter_default_value);
954 zend_string *property_parameter_name = zend_string_init("parameter", sizeof("parameter") - 1, 1);
955 zend_declare_typed_property(class_entry, property_parameter_name, &property_parameter_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
956 zend_string_release(property_parameter_name);
957
958 zend_string *attribute_name_Attribute_class_ZendTestParameterAttribute_0 = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
959 zend_attribute *attribute_Attribute_class_ZendTestParameterAttribute_0 = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestParameterAttribute_0, 1);
960 zend_string_release(attribute_name_Attribute_class_ZendTestParameterAttribute_0);
961 zval attribute_Attribute_class_ZendTestParameterAttribute_0_arg0;
962 ZVAL_LONG(&attribute_Attribute_class_ZendTestParameterAttribute_0_arg0, ZEND_ATTRIBUTE_TARGET_PARAMETER);
963 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestParameterAttribute_0->args[0].value, &attribute_Attribute_class_ZendTestParameterAttribute_0_arg0);
964
965 return class_entry;
966 }
967
register_class_ZendTestPropertyAttribute(void)968 static zend_class_entry *register_class_ZendTestPropertyAttribute(void)
969 {
970 zend_class_entry ce, *class_entry;
971
972 INIT_CLASS_ENTRY(ce, "ZendTestPropertyAttribute", class_ZendTestPropertyAttribute_methods);
973 #if (PHP_VERSION_ID >= 80400)
974 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
975 #else
976 class_entry = zend_register_internal_class_ex(&ce, NULL);
977 class_entry->ce_flags |= ZEND_ACC_FINAL;
978 #endif
979 #if (PHP_VERSION_ID >= 80400)
980 class_entry->doc_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://www.php.net\n * @since 8.1\n */", 82, 1);
981 #endif
982
983 zval property_parameter_default_value;
984 ZVAL_UNDEF(&property_parameter_default_value);
985 zend_string *property_parameter_name = zend_string_init("parameter", sizeof("parameter") - 1, 1);
986 zend_string *property_parameter_comment = zend_string_init_interned("/**\n * \"Lorem ipsum\"\n * @see https://www.php.net\n * @since 8.4\n */", 98, 1);
987 zend_declare_typed_property(class_entry, property_parameter_name, &property_parameter_default_value, ZEND_ACC_PUBLIC, property_parameter_comment, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
988 zend_string_release(property_parameter_name);
989
990 zend_string *attribute_name_Attribute_class_ZendTestPropertyAttribute_0 = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
991 zend_attribute *attribute_Attribute_class_ZendTestPropertyAttribute_0 = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestPropertyAttribute_0, 1);
992 zend_string_release(attribute_name_Attribute_class_ZendTestPropertyAttribute_0);
993 zval attribute_Attribute_class_ZendTestPropertyAttribute_0_arg0;
994 ZVAL_LONG(&attribute_Attribute_class_ZendTestPropertyAttribute_0_arg0, ZEND_ATTRIBUTE_TARGET_PROPERTY);
995 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestPropertyAttribute_0->args[0].value, &attribute_Attribute_class_ZendTestPropertyAttribute_0_arg0);
996
997 return class_entry;
998 }
999
register_class_ZendTestClassWithMethodWithParameterAttribute(void)1000 static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttribute(void)
1001 {
1002 zend_class_entry ce, *class_entry;
1003
1004 INIT_CLASS_ENTRY(ce, "ZendTestClassWithMethodWithParameterAttribute", class_ZendTestClassWithMethodWithParameterAttribute_methods);
1005 #if (PHP_VERSION_ID >= 80400)
1006 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1007 #else
1008 class_entry = zend_register_internal_class_ex(&ce, NULL);
1009 #endif
1010
1011
1012 zend_string *attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1);
1013 zend_attribute *attribute_ZendTestParameterAttribute_func_no_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "no_override", sizeof("no_override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0, 1);
1014 zend_string_release(attribute_name_ZendTestParameterAttribute_func_no_override_arg0_0);
1015 zval attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0;
1016 zend_string *attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0_str = zend_string_init("value2", strlen("value2"), 1);
1017 ZVAL_STR(&attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0, attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0_str);
1018 ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_func_no_override_arg0_0->args[0].value, &attribute_ZendTestParameterAttribute_func_no_override_arg0_0_arg0);
1019
1020 zend_string *attribute_name_ZendTestParameterAttribute_func_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1);
1021 zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1);
1022 zend_string_release(attribute_name_ZendTestParameterAttribute_func_override_arg0_0);
1023 zval attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0;
1024 zend_string *attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str = zend_string_init("value3", strlen("value3"), 1);
1025 ZVAL_STR(&attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0, attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str);
1026 ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_func_override_arg0_0->args[0].value, &attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0);
1027
1028 return class_entry;
1029 }
1030
register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_class_entry * class_entry_ZendTestClassWithMethodWithParameterAttribute)1031 static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_class_entry *class_entry_ZendTestClassWithMethodWithParameterAttribute)
1032 {
1033 zend_class_entry ce, *class_entry;
1034
1035 INIT_CLASS_ENTRY(ce, "ZendTestChildClassWithMethodWithParameterAttribute", class_ZendTestChildClassWithMethodWithParameterAttribute_methods);
1036 #if (PHP_VERSION_ID >= 80400)
1037 class_entry = zend_register_internal_class_with_flags(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute, 0);
1038 #else
1039 class_entry = zend_register_internal_class_ex(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute);
1040 #endif
1041
1042
1043 zend_string *attribute_name_ZendTestParameterAttribute_func_override_arg0_0 = zend_string_init_interned("ZendTestParameterAttribute", sizeof("ZendTestParameterAttribute") - 1, 1);
1044 zend_attribute *attribute_ZendTestParameterAttribute_func_override_arg0_0 = zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "override", sizeof("override") - 1), 0, attribute_name_ZendTestParameterAttribute_func_override_arg0_0, 1);
1045 zend_string_release(attribute_name_ZendTestParameterAttribute_func_override_arg0_0);
1046 zval attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0;
1047 zend_string *attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str = zend_string_init("value4", strlen("value4"), 1);
1048 ZVAL_STR(&attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0, attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0_str);
1049 ZVAL_COPY_VALUE(&attribute_ZendTestParameterAttribute_func_override_arg0_0->args[0].value, &attribute_ZendTestParameterAttribute_func_override_arg0_0_arg0);
1050
1051 return class_entry;
1052 }
1053
register_class_ZendTestClassWithPropertyAttribute(void)1054 static zend_class_entry *register_class_ZendTestClassWithPropertyAttribute(void)
1055 {
1056 zend_class_entry ce, *class_entry;
1057
1058 INIT_CLASS_ENTRY(ce, "ZendTestClassWithPropertyAttribute", NULL);
1059 #if (PHP_VERSION_ID >= 80400)
1060 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1061 #else
1062 class_entry = zend_register_internal_class_ex(&ce, NULL);
1063 #endif
1064
1065 zval property_attributed_default_value;
1066 ZVAL_UNDEF(&property_attributed_default_value);
1067 zend_string *property_attributed_name = zend_string_init("attributed", sizeof("attributed") - 1, 1);
1068 zend_property_info *property_attributed = zend_declare_typed_property(class_entry, property_attributed_name, &property_attributed_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
1069 zend_string_release(property_attributed_name);
1070
1071
1072 zend_string *attribute_name_ZendTestAttribute_property_attributed_0 = zend_string_init_interned("ZendTestAttribute", sizeof("ZendTestAttribute") - 1, 1);
1073 zend_add_property_attribute(class_entry, property_attributed, attribute_name_ZendTestAttribute_property_attributed_0, 0);
1074 zend_string_release(attribute_name_ZendTestAttribute_property_attributed_0);
1075
1076 return class_entry;
1077 }
1078
register_class_ZendTestForbidDynamicCall(void)1079 static zend_class_entry *register_class_ZendTestForbidDynamicCall(void)
1080 {
1081 zend_class_entry ce, *class_entry;
1082
1083 INIT_CLASS_ENTRY(ce, "ZendTestForbidDynamicCall", class_ZendTestForbidDynamicCall_methods);
1084 #if (PHP_VERSION_ID >= 80400)
1085 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL);
1086 #else
1087 class_entry = zend_register_internal_class_ex(&ce, NULL);
1088 class_entry->ce_flags |= ZEND_ACC_FINAL;
1089 #endif
1090
1091 return class_entry;
1092 }
1093
1094 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestUnitEnum(void)1095 static zend_class_entry *register_class_ZendTestUnitEnum(void)
1096 {
1097 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestUnitEnum", IS_UNDEF, NULL);
1098
1099 zend_enum_add_case_cstr(class_entry, "Foo", NULL);
1100
1101 zend_enum_add_case_cstr(class_entry, "Bar", NULL);
1102
1103 return class_entry;
1104 }
1105 #endif
1106
1107 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestStringEnum(void)1108 static zend_class_entry *register_class_ZendTestStringEnum(void)
1109 {
1110 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestStringEnum", IS_STRING, NULL);
1111
1112 zval enum_case_Foo_value;
1113 zend_string *enum_case_Foo_value_str = zend_string_init("Test1", strlen("Test1"), 1);
1114 ZVAL_STR(&enum_case_Foo_value, enum_case_Foo_value_str);
1115 zend_enum_add_case_cstr(class_entry, "Foo", &enum_case_Foo_value);
1116
1117 zval enum_case_Bar_value;
1118 zend_string *enum_case_Bar_value_str = zend_string_init("Test2", strlen("Test2"), 1);
1119 ZVAL_STR(&enum_case_Bar_value, enum_case_Bar_value_str);
1120 zend_enum_add_case_cstr(class_entry, "Bar", &enum_case_Bar_value);
1121
1122 zval enum_case_Baz_value;
1123 zend_string *enum_case_Baz_value_str = zend_string_init("Test2\\a", strlen("Test2\\a"), 1);
1124 ZVAL_STR(&enum_case_Baz_value, enum_case_Baz_value_str);
1125 zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
1126
1127 zval enum_case_FortyTwo_value;
1128 zend_string *enum_case_FortyTwo_value_str = zend_string_init("42", strlen("42"), 1);
1129 ZVAL_STR(&enum_case_FortyTwo_value, enum_case_FortyTwo_value_str);
1130 zend_enum_add_case_cstr(class_entry, "FortyTwo", &enum_case_FortyTwo_value);
1131
1132 return class_entry;
1133 }
1134 #endif
1135
1136 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestIntEnum(void)1137 static zend_class_entry *register_class_ZendTestIntEnum(void)
1138 {
1139 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestIntEnum", IS_LONG, NULL);
1140
1141 zval enum_case_Foo_value;
1142 ZVAL_LONG(&enum_case_Foo_value, 1);
1143 zend_enum_add_case_cstr(class_entry, "Foo", &enum_case_Foo_value);
1144
1145 zval enum_case_Bar_value;
1146 ZVAL_LONG(&enum_case_Bar_value, 3);
1147 zend_enum_add_case_cstr(class_entry, "Bar", &enum_case_Bar_value);
1148
1149 zval enum_case_Baz_value;
1150 ZVAL_LONG(&enum_case_Baz_value, -1);
1151 zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
1152
1153 return class_entry;
1154 }
1155 #endif
1156
register_class_ZendTestNS_Foo(void)1157 static zend_class_entry *register_class_ZendTestNS_Foo(void)
1158 {
1159 zend_class_entry ce, *class_entry;
1160
1161 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "Foo", class_ZendTestNS_Foo_methods);
1162 #if (PHP_VERSION_ID >= 80400)
1163 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1164 #else
1165 class_entry = zend_register_internal_class_ex(&ce, NULL);
1166 #endif
1167
1168 return class_entry;
1169 }
1170
register_class_ZendTestNS_UnlikelyCompileError(void)1171 static zend_class_entry *register_class_ZendTestNS_UnlikelyCompileError(void)
1172 {
1173 zend_class_entry ce, *class_entry;
1174
1175 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "UnlikelyCompileError", class_ZendTestNS_UnlikelyCompileError_methods);
1176 #if (PHP_VERSION_ID >= 80400)
1177 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1178 #else
1179 class_entry = zend_register_internal_class_ex(&ce, NULL);
1180 #endif
1181
1182 return class_entry;
1183 }
1184
register_class_ZendTestNS_NotUnlikelyCompileError(void)1185 static zend_class_entry *register_class_ZendTestNS_NotUnlikelyCompileError(void)
1186 {
1187 zend_class_entry ce, *class_entry;
1188
1189 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "NotUnlikelyCompileError", class_ZendTestNS_NotUnlikelyCompileError_methods);
1190 #if (PHP_VERSION_ID >= 80400)
1191 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1192 #else
1193 class_entry = zend_register_internal_class_ex(&ce, NULL);
1194 #endif
1195
1196 return class_entry;
1197 }
1198
register_class_ZendTestNS2_Foo(void)1199 static zend_class_entry *register_class_ZendTestNS2_Foo(void)
1200 {
1201 zend_class_entry ce, *class_entry;
1202
1203 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2", "Foo", class_ZendTestNS2_Foo_methods);
1204 #if (PHP_VERSION_ID >= 80400)
1205 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1206 #else
1207 class_entry = zend_register_internal_class_ex(&ce, NULL);
1208 #endif
1209
1210 zval property_foo_default_value;
1211 ZVAL_UNDEF(&property_foo_default_value);
1212 zend_string *property_foo_name = zend_string_init("foo", sizeof("foo") - 1, 1);
1213 zend_string *property_foo_class_ZendTestNS2_ZendSubNS_Foo = zend_string_init("ZendTestNS2\\ZendSubNS\\Foo", sizeof("ZendTestNS2\\ZendSubNS\\Foo")-1, 1);
1214 zend_declare_typed_property(class_entry, property_foo_name, &property_foo_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_foo_class_ZendTestNS2_ZendSubNS_Foo, 0, 0));
1215 zend_string_release(property_foo_name);
1216
1217 return class_entry;
1218 }
1219
register_class_ZendTestNS2_ZendSubNS_Foo(void)1220 static zend_class_entry *register_class_ZendTestNS2_ZendSubNS_Foo(void)
1221 {
1222 zend_class_entry ce, *class_entry;
1223
1224 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2\\ZendSubNS", "Foo", class_ZendTestNS2_ZendSubNS_Foo_methods);
1225 #if (PHP_VERSION_ID >= 80400)
1226 class_entry = zend_register_internal_class_with_flags(&ce, NULL, 0);
1227 #else
1228 class_entry = zend_register_internal_class_ex(&ce, NULL);
1229 #endif
1230
1231 return class_entry;
1232 }
1233