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