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