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