1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: 07ce28cd75080118509ac0d30d8ce5ef54110747 */
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_aliased arginfo_zend_test_void_return
24
25 #define arginfo_zend_test_deprecated_aliased arginfo_zend_test_void_return
26
27 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, 0, 1, IS_STRING, 0)
28 ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
29 ZEND_END_ARG_INFO()
30
31 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_VOID, 0)
32 ZEND_ARG_TYPE_INFO(1, str, IS_STRING, 0)
33 ZEND_END_ARG_INFO()
34
35 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_variable, 0, 1, IS_VOID, 0)
36 ZEND_ARG_TYPE_INFO(0, variable, IS_MIXED, 0)
37 ZEND_END_ARG_INFO()
38
39 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_bytes, 0, 0, IS_VOID, 0)
40 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bytes, IS_LONG, 0, "3")
41 ZEND_END_ARG_INFO()
42
43 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_string_or_object, 0, 1, MAY_BE_OBJECT|MAY_BE_STRING)
44 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING, NULL)
45 ZEND_END_ARG_INFO()
46
47 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)
48 ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL, NULL)
49 ZEND_END_ARG_INFO()
50
51 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_zend_string_or_stdclass, 0, 1, stdClass, MAY_BE_STRING)
52 ZEND_ARG_INFO(0, param)
53 ZEND_END_ARG_INFO()
54
55 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)
56 ZEND_ARG_INFO(0, param)
57 ZEND_END_ARG_INFO()
58
59 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_iterable, 0, 1, IS_VOID, 0)
60 ZEND_ARG_OBJ_TYPE_MASK(0, arg1, Traversable, MAY_BE_ARRAY, NULL)
61 ZEND_ARG_OBJ_TYPE_MASK(0, arg2, Traversable, MAY_BE_ARRAY|MAY_BE_NULL, "null")
62 ZEND_END_ARG_INFO()
63
64 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_attach, 0, 2, _IS_BOOL, 0)
65 ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
66 ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
67 ZEND_END_ARG_INFO()
68
69 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_remove, 0, 1, _IS_BOOL, 0)
70 ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
71 ZEND_END_ARG_INFO()
72
73 #define arginfo_zend_weakmap_dump arginfo_zend_test_array_return
74
75 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_zend_get_unit_enum, 0, 0, ZendTestUnitEnum, 0)
76 ZEND_END_ARG_INFO()
77
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_parameter_with_attribute, 0, 1, IS_LONG, 0)
79 ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
80 ZEND_END_ARG_INFO()
81
82 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_current_func_name, 0, 0, IS_STRING, 0)
83 ZEND_END_ARG_INFO()
84
85 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_call_method, 0, 2, IS_MIXED, 0)
86 ZEND_ARG_TYPE_MASK(0, obj_or_class, MAY_BE_OBJECT|MAY_BE_STRING, NULL)
87 ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
88 ZEND_ARG_TYPE_INFO(0, arg1, IS_MIXED, 0)
89 ZEND_ARG_TYPE_INFO(0, arg2, IS_MIXED, 0)
90 ZEND_END_ARG_INFO()
91
92 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_zend_ini_parse_quantity, 0, 1, IS_LONG, 0)
93 ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
94 ZEND_END_ARG_INFO()
95
96 #define arginfo_zend_test_zend_ini_parse_uquantity arginfo_zend_test_zend_ini_parse_quantity
97
98 #define arginfo_zend_test_zend_ini_str arginfo_zend_get_current_func_name
99
100 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_map_ptr_last, 0, 0, IS_LONG, 0)
101 ZEND_END_ARG_INFO()
102
103 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_crash, 0, 0, IS_VOID, 0)
104 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 1, "null")
105 ZEND_END_ARG_INFO()
106
107 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
108 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global_state, 0, 0, IS_VOID, 0)
109 ZEND_END_ARG_INFO()
110 #endif
111
112 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_pcre_bundled, 0, 0, _IS_BOOL, 0)
113 ZEND_END_ARG_INFO()
114
115 #if defined(PHP_WIN32)
116 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_set_fmode, 0, 1, IS_VOID, 0)
117 ZEND_ARG_TYPE_INFO(0, binary, _IS_BOOL, 0)
118 ZEND_END_ARG_INFO()
119 #endif
120
121 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_cast_fread, 0, 1, IS_VOID, 0)
122 ZEND_ARG_INFO(0, stream)
123 ZEND_END_ARG_INFO()
124
125 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_is_zend_ptr, 0, 1, _IS_BOOL, 0)
126 ZEND_ARG_TYPE_INFO(0, addr, IS_LONG, 0)
127 ZEND_END_ARG_INFO()
128
129 #define arginfo_ZendTestNS2_namespaced_func arginfo_zend_test_is_pcre_bundled
130
131 #define arginfo_ZendTestNS2_namespaced_deprecated_func arginfo_zend_test_void_return
132
133 #define arginfo_ZendTestNS2_namespaced_aliased_func arginfo_zend_test_void_return
134
135 #define arginfo_ZendTestNS2_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
136
137 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_func arginfo_zend_test_is_pcre_bundled
138
139 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func arginfo_zend_test_void_return
140
141 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func arginfo_zend_test_void_return
142
143 #define arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func arginfo_zend_test_void_return
144
145 #define arginfo_class__ZendTestClass_is_object arginfo_zend_get_map_ptr_last
146
147 #define arginfo_class__ZendTestClass___toString arginfo_zend_get_current_func_name
148
149 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_returnsStatic, 0, 0, IS_STATIC, 0)
150 ZEND_END_ARG_INFO()
151
152 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestClass_returnsThrowable, 0, 0, Throwable, 0)
153 ZEND_END_ARG_INFO()
154
155 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_variadicTest, 0, 0, IS_STATIC, 0)
156 ZEND_ARG_VARIADIC_OBJ_TYPE_MASK(0, elements, Iterator, MAY_BE_STRING)
157 ZEND_END_ARG_INFO()
158
159 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestMagicCall___call, 0, 2, IS_MIXED, 0)
160 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
161 ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0)
162 ZEND_END_ARG_INFO()
163
164 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
165 ZEND_END_ARG_INFO()
166
167 #define arginfo_class__ZendTestTrait_testMethod arginfo_zend_test_is_pcre_bundled
168
169 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
170 ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
171 ZEND_END_ARG_INFO()
172
173 #define arginfo_class_ZendTestPropertyAttribute___construct arginfo_class_ZendTestParameterAttribute___construct
174
175 #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override arginfo_zend_test_parameter_with_attribute
176
177 #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
178
179 #define arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
180
181 #define arginfo_class_ZendTestForbidDynamicCall_call arginfo_zend_test_void_return
182
183 #define arginfo_class_ZendTestForbidDynamicCall_callStatic arginfo_zend_test_void_return
184
185 #if (PHP_VERSION_ID >= 80100)
186 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZendTestNS_Foo_method, 0, 0, IS_LONG, 0)
187 #else
188 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestNS_Foo_method, 0, 0, 0)
189 #endif
190 ZEND_END_ARG_INFO()
191
192 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ZendTestNS_UnlikelyCompileError_method, 0, 0, ZendTestNS\\\125nlikelyCompileError, 1)
193 ZEND_END_ARG_INFO()
194
195 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ZendTestNS_NotUnlikelyCompileError_method, 0, 0, ZendTestNS\\\116otUnlikelyCompileError, 1)
196 ZEND_END_ARG_INFO()
197
198 #define arginfo_class_ZendTestNS2_Foo_method arginfo_zend_test_void_return
199
200 #define arginfo_class_ZendTestNS2_ZendSubNS_Foo_method arginfo_zend_test_void_return
201
202
203 static ZEND_FUNCTION(zend_test_array_return);
204 static ZEND_FUNCTION(zend_test_nullable_array_return);
205 static ZEND_FUNCTION(zend_test_void_return);
206 static ZEND_FUNCTION(zend_test_compile_string);
207 static ZEND_FUNCTION(zend_test_deprecated);
208 static ZEND_FUNCTION(zend_create_unterminated_string);
209 static ZEND_FUNCTION(zend_terminate_string);
210 static ZEND_FUNCTION(zend_leak_variable);
211 static ZEND_FUNCTION(zend_leak_bytes);
212 static ZEND_FUNCTION(zend_string_or_object);
213 static ZEND_FUNCTION(zend_string_or_object_or_null);
214 static ZEND_FUNCTION(zend_string_or_stdclass);
215 static ZEND_FUNCTION(zend_string_or_stdclass_or_null);
216 static ZEND_FUNCTION(zend_iterable);
217 static ZEND_FUNCTION(zend_weakmap_attach);
218 static ZEND_FUNCTION(zend_weakmap_remove);
219 static ZEND_FUNCTION(zend_weakmap_dump);
220 static ZEND_FUNCTION(zend_get_unit_enum);
221 static ZEND_FUNCTION(zend_test_parameter_with_attribute);
222 static ZEND_FUNCTION(zend_get_current_func_name);
223 static ZEND_FUNCTION(zend_call_method);
224 static ZEND_FUNCTION(zend_test_zend_ini_parse_quantity);
225 static ZEND_FUNCTION(zend_test_zend_ini_parse_uquantity);
226 static ZEND_FUNCTION(zend_test_zend_ini_str);
227 static ZEND_FUNCTION(zend_get_map_ptr_last);
228 static ZEND_FUNCTION(zend_test_crash);
229 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
230 static ZEND_FUNCTION(zend_test_override_libxml_global_state);
231 #endif
232 static ZEND_FUNCTION(zend_test_is_pcre_bundled);
233 #if defined(PHP_WIN32)
234 static ZEND_FUNCTION(zend_test_set_fmode);
235 #endif
236 static ZEND_FUNCTION(zend_test_cast_fread);
237 static ZEND_FUNCTION(zend_test_is_zend_ptr);
238 static ZEND_FUNCTION(ZendTestNS2_namespaced_func);
239 static ZEND_FUNCTION(ZendTestNS2_namespaced_deprecated_func);
240 static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_func);
241 static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_deprecated_func);
242 static ZEND_METHOD(_ZendTestClass, is_object);
243 static ZEND_METHOD(_ZendTestClass, __toString);
244 static ZEND_METHOD(_ZendTestClass, returnsStatic);
245 static ZEND_METHOD(_ZendTestClass, returnsThrowable);
246 static ZEND_METHOD(_ZendTestClass, variadicTest);
247 static ZEND_METHOD(_ZendTestMagicCall, __call);
248 static ZEND_METHOD(_ZendTestChildClass, returnsThrowable);
249 static ZEND_METHOD(_ZendTestTrait, testMethod);
250 static ZEND_METHOD(ZendTestParameterAttribute, __construct);
251 static ZEND_METHOD(ZendTestPropertyAttribute, __construct);
252 static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, no_override);
253 static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, override);
254 static ZEND_METHOD(ZendTestChildClassWithMethodWithParameterAttribute, override);
255 static ZEND_METHOD(ZendTestForbidDynamicCall, call);
256 static ZEND_METHOD(ZendTestForbidDynamicCall, callStatic);
257 static ZEND_METHOD(ZendTestNS_Foo, method);
258 static ZEND_METHOD(ZendTestNS_UnlikelyCompileError, method);
259 static ZEND_METHOD(ZendTestNS_NotUnlikelyCompileError, method);
260 static ZEND_METHOD(ZendTestNS2_Foo, method);
261 static ZEND_METHOD(ZendTestNS2_ZendSubNS_Foo, method);
262
263
264 static const zend_function_entry ext_functions[] = {
265 ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return)
266 ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return)
267 ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return)
268 ZEND_FE(zend_test_compile_string, arginfo_zend_test_compile_string)
269 ZEND_DEP_FE(zend_test_deprecated, arginfo_zend_test_deprecated)
270 ZEND_FALIAS(zend_test_aliased, zend_test_void_return, arginfo_zend_test_aliased)
271 ZEND_DEP_FALIAS(zend_test_deprecated_aliased, zend_test_void_return, arginfo_zend_test_deprecated_aliased)
272 ZEND_FE(zend_create_unterminated_string, arginfo_zend_create_unterminated_string)
273 ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string)
274 ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable)
275 ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes)
276 ZEND_FE(zend_string_or_object, arginfo_zend_string_or_object)
277 ZEND_FE(zend_string_or_object_or_null, arginfo_zend_string_or_object_or_null)
278 ZEND_FE(zend_string_or_stdclass, arginfo_zend_string_or_stdclass)
279 ZEND_FE(zend_string_or_stdclass_or_null, arginfo_zend_string_or_stdclass_or_null)
280 ZEND_FE(zend_iterable, arginfo_zend_iterable)
281 ZEND_FE(zend_weakmap_attach, arginfo_zend_weakmap_attach)
282 ZEND_FE(zend_weakmap_remove, arginfo_zend_weakmap_remove)
283 ZEND_FE(zend_weakmap_dump, arginfo_zend_weakmap_dump)
284 ZEND_FE(zend_get_unit_enum, arginfo_zend_get_unit_enum)
285 ZEND_FE(zend_test_parameter_with_attribute, arginfo_zend_test_parameter_with_attribute)
286 ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name)
287 ZEND_FE(zend_call_method, arginfo_zend_call_method)
288 ZEND_FE(zend_test_zend_ini_parse_quantity, arginfo_zend_test_zend_ini_parse_quantity)
289 ZEND_FE(zend_test_zend_ini_parse_uquantity, arginfo_zend_test_zend_ini_parse_uquantity)
290 ZEND_FE(zend_test_zend_ini_str, arginfo_zend_test_zend_ini_str)
291 ZEND_FE(zend_get_map_ptr_last, arginfo_zend_get_map_ptr_last)
292 ZEND_FE(zend_test_crash, arginfo_zend_test_crash)
293 #if defined(HAVE_LIBXML) && !defined(PHP_WIN32)
294 ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state)
295 #endif
296 ZEND_FE(zend_test_is_pcre_bundled, arginfo_zend_test_is_pcre_bundled)
297 #if defined(PHP_WIN32)
298 ZEND_FE(zend_test_set_fmode, arginfo_zend_test_set_fmode)
299 #endif
300 ZEND_FE(zend_test_cast_fread, arginfo_zend_test_cast_fread)
301 ZEND_FE(zend_test_is_zend_ptr, arginfo_zend_test_is_zend_ptr)
302 ZEND_NS_FALIAS("ZendTestNS2", namespaced_func, ZendTestNS2_namespaced_func, arginfo_ZendTestNS2_namespaced_func)
303 ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_func, ZendTestNS2_namespaced_deprecated_func, arginfo_ZendTestNS2_namespaced_deprecated_func)
304 ZEND_NS_FALIAS("ZendTestNS2", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_aliased_func)
305 ZEND_NS_DEP_FALIAS("ZendTestNS2", namespaced_deprecated_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_namespaced_deprecated_aliased_func)
306 ZEND_NS_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_func, ZendTestNS2_ZendSubNS_namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func)
307 ZEND_NS_DEP_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_deprecated_func, ZendTestNS2_ZendSubNS_namespaced_deprecated_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func)
308 ZEND_NS_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func)
309 ZEND_NS_DEP_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_deprecated_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func)
310 ZEND_FE_END
311 };
312
313
314 static const zend_function_entry class__ZendTestInterface_methods[] = {
315 ZEND_FE_END
316 };
317
318
319 static const zend_function_entry class__ZendTestClass_methods[] = {
320 ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
321 ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
322 ZEND_ME(_ZendTestClass, returnsStatic, arginfo_class__ZendTestClass_returnsStatic, ZEND_ACC_PUBLIC)
323 ZEND_ME(_ZendTestClass, returnsThrowable, arginfo_class__ZendTestClass_returnsThrowable, ZEND_ACC_PUBLIC)
324 ZEND_ME(_ZendTestClass, variadicTest, arginfo_class__ZendTestClass_variadicTest, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
325 ZEND_FE_END
326 };
327
328
329 static const zend_function_entry class__ZendTestMagicCall_methods[] = {
330 ZEND_ME(_ZendTestMagicCall, __call, arginfo_class__ZendTestMagicCall___call, ZEND_ACC_PUBLIC)
331 ZEND_FE_END
332 };
333
334
335 static const zend_function_entry class__ZendTestChildClass_methods[] = {
336 ZEND_ME(_ZendTestChildClass, returnsThrowable, arginfo_class__ZendTestChildClass_returnsThrowable, ZEND_ACC_PUBLIC)
337 ZEND_FE_END
338 };
339
340
341 static const zend_function_entry class__ZendTestTrait_methods[] = {
342 ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC)
343 ZEND_FE_END
344 };
345
346
347 static const zend_function_entry class_ZendTestAttribute_methods[] = {
348 ZEND_FE_END
349 };
350
351
352 static const zend_function_entry class_ZendTestParameterAttribute_methods[] = {
353 ZEND_ME(ZendTestParameterAttribute, __construct, arginfo_class_ZendTestParameterAttribute___construct, ZEND_ACC_PUBLIC)
354 ZEND_FE_END
355 };
356
357
358 static const zend_function_entry class_ZendTestPropertyAttribute_methods[] = {
359 ZEND_ME(ZendTestPropertyAttribute, __construct, arginfo_class_ZendTestPropertyAttribute___construct, ZEND_ACC_PUBLIC)
360 ZEND_FE_END
361 };
362
363
364 static const zend_function_entry class_ZendTestClassWithMethodWithParameterAttribute_methods[] = {
365 ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, no_override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
366 ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
367 ZEND_FE_END
368 };
369
370
371 static const zend_function_entry class_ZendTestChildClassWithMethodWithParameterAttribute_methods[] = {
372 ZEND_ME(ZendTestChildClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
373 ZEND_FE_END
374 };
375
376
377 static const zend_function_entry class_ZendTestForbidDynamicCall_methods[] = {
378 ZEND_ME(ZendTestForbidDynamicCall, call, arginfo_class_ZendTestForbidDynamicCall_call, ZEND_ACC_PUBLIC)
379 ZEND_ME(ZendTestForbidDynamicCall, callStatic, arginfo_class_ZendTestForbidDynamicCall_callStatic, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
380 ZEND_FE_END
381 };
382
383
384 static const zend_function_entry class_ZendTestUnitEnum_methods[] = {
385 ZEND_FE_END
386 };
387
388
389 static const zend_function_entry class_ZendTestStringEnum_methods[] = {
390 ZEND_FE_END
391 };
392
393
394 static const zend_function_entry class_ZendTestIntEnum_methods[] = {
395 ZEND_FE_END
396 };
397
398
399 static const zend_function_entry class_ZendTestNS_Foo_methods[] = {
400 ZEND_ME(ZendTestNS_Foo, method, arginfo_class_ZendTestNS_Foo_method, ZEND_ACC_PUBLIC)
401 ZEND_FE_END
402 };
403
404
405 static const zend_function_entry class_ZendTestNS_UnlikelyCompileError_methods[] = {
406 ZEND_ME(ZendTestNS_UnlikelyCompileError, method, arginfo_class_ZendTestNS_UnlikelyCompileError_method, ZEND_ACC_PUBLIC)
407 ZEND_FE_END
408 };
409
410
411 static const zend_function_entry class_ZendTestNS_NotUnlikelyCompileError_methods[] = {
412 ZEND_ME(ZendTestNS_NotUnlikelyCompileError, method, arginfo_class_ZendTestNS_NotUnlikelyCompileError_method, ZEND_ACC_PUBLIC)
413 ZEND_FE_END
414 };
415
416
417 static const zend_function_entry class_ZendTestNS2_Foo_methods[] = {
418 ZEND_ME(ZendTestNS2_Foo, method, arginfo_class_ZendTestNS2_Foo_method, ZEND_ACC_PUBLIC)
419 ZEND_FE_END
420 };
421
422
423 static const zend_function_entry class_ZendTestNS2_ZendSubNS_Foo_methods[] = {
424 ZEND_ME(ZendTestNS2_ZendSubNS_Foo, method, arginfo_class_ZendTestNS2_ZendSubNS_Foo_method, ZEND_ACC_PUBLIC)
425 ZEND_FE_END
426 };
427
register_test_symbols(int module_number)428 static void register_test_symbols(int module_number)
429 {
430 REGISTER_LONG_CONSTANT("ZEND_TEST_DEPRECATED", 42, CONST_PERSISTENT | CONST_DEPRECATED);
431 REGISTER_STRING_CONSTANT("ZEND_CONSTANT_A", "global", CONST_PERSISTENT);
432 REGISTER_STRING_CONSTANT("ZendTestNS2\\ZEND_CONSTANT_A", ZEND_TEST_NS_CONSTANT_A, CONST_PERSISTENT);
433 REGISTER_STRING_CONSTANT("ZendTestNS2\\ZendSubNS\\ZEND_CONSTANT_A", ZEND_TEST_NS_CONSTANT_A, CONST_PERSISTENT);
434 }
435
register_class__ZendTestInterface(void)436 static zend_class_entry *register_class__ZendTestInterface(void)
437 {
438 zend_class_entry ce, *class_entry;
439
440 INIT_CLASS_ENTRY(ce, "_ZendTestInterface", class__ZendTestInterface_methods);
441 class_entry = zend_register_internal_interface(&ce);
442
443 zval const_DUMMY_value;
444 ZVAL_LONG(&const_DUMMY_value, 0);
445 zend_string *const_DUMMY_name = zend_string_init_interned("DUMMY", sizeof("DUMMY") - 1, 1);
446 zend_declare_class_constant_ex(class_entry, const_DUMMY_name, &const_DUMMY_value, ZEND_ACC_PUBLIC, NULL);
447 zend_string_release(const_DUMMY_name);
448
449 return class_entry;
450 }
451
register_class__ZendTestClass(zend_class_entry * class_entry__ZendTestInterface)452 static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_entry__ZendTestInterface)
453 {
454 zend_class_entry ce, *class_entry;
455
456 INIT_CLASS_ENTRY(ce, "_ZendTestClass", class__ZendTestClass_methods);
457 class_entry = zend_register_internal_class_ex(&ce, NULL);
458 zend_class_implements(class_entry, 1, class_entry__ZendTestInterface);
459 zend_register_class_alias("_ZendTestClassAlias", class_entry);
460
461 zval property__StaticProp_default_value;
462 ZVAL_NULL(&property__StaticProp_default_value);
463 zend_string *property__StaticProp_name = zend_string_init("_StaticProp", sizeof("_StaticProp") - 1, 1);
464 zend_declare_property_ex(class_entry, property__StaticProp_name, &property__StaticProp_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC, NULL);
465 zend_string_release(property__StaticProp_name);
466
467 zval property_staticIntProp_default_value;
468 ZVAL_LONG(&property_staticIntProp_default_value, 123);
469 zend_string *property_staticIntProp_name = zend_string_init("staticIntProp", sizeof("staticIntProp") - 1, 1);
470 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));
471 zend_string_release(property_staticIntProp_name);
472
473 zval property_intProp_default_value;
474 ZVAL_LONG(&property_intProp_default_value, 123);
475 zend_string *property_intProp_name = zend_string_init("intProp", sizeof("intProp") - 1, 1);
476 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));
477 zend_string_release(property_intProp_name);
478
479 zend_string *property_classProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass")-1, 1);
480 zval property_classProp_default_value;
481 ZVAL_NULL(&property_classProp_default_value);
482 zend_string *property_classProp_name = zend_string_init("classProp", sizeof("classProp") - 1, 1);
483 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));
484 zend_string_release(property_classProp_name);
485
486 zend_string *property_classUnionProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass") - 1, 1);
487 zend_string *property_classUnionProp_class_Iterator = zend_string_init("Iterator", sizeof("Iterator") - 1, 1);
488 zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
489 property_classUnionProp_type_list->num_types = 2;
490 property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_stdClass, 0, 0);
491 property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Iterator, 0, 0);
492 zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, MAY_BE_NULL);
493 zval property_classUnionProp_default_value;
494 ZVAL_NULL(&property_classUnionProp_default_value);
495 zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
496 zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
497 zend_string_release(property_classUnionProp_name);
498
499 zend_string *property_classIntersectionProp_class_Traversable = zend_string_init("Traversable", sizeof("Traversable") - 1, 1);
500 zend_string *property_classIntersectionProp_class_Countable = zend_string_init("Countable", sizeof("Countable") - 1, 1);
501 zend_type_list *property_classIntersectionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
502 property_classIntersectionProp_type_list->num_types = 2;
503 property_classIntersectionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Traversable, 0, 0);
504 property_classIntersectionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classIntersectionProp_class_Countable, 0, 0);
505 zend_type property_classIntersectionProp_type = ZEND_TYPE_INIT_INTERSECTION(property_classIntersectionProp_type_list, 0);
506 zval property_classIntersectionProp_default_value;
507 ZVAL_UNDEF(&property_classIntersectionProp_default_value);
508 zend_string *property_classIntersectionProp_name = zend_string_init("classIntersectionProp", sizeof("classIntersectionProp") - 1, 1);
509 zend_declare_typed_property(class_entry, property_classIntersectionProp_name, &property_classIntersectionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classIntersectionProp_type);
510 zend_string_release(property_classIntersectionProp_name);
511
512 zval property_readonlyProp_default_value;
513 ZVAL_UNDEF(&property_readonlyProp_default_value);
514 zend_string *property_readonlyProp_name = zend_string_init("readonlyProp", sizeof("readonlyProp") - 1, 1);
515 #if (PHP_VERSION_ID >= 80100)
516 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));
517 #elif (PHP_VERSION_ID >= 80000)
518 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));
519 #endif
520 zend_string_release(property_readonlyProp_name);
521
522 return class_entry;
523 }
524
register_class__ZendTestMagicCall(void)525 static zend_class_entry *register_class__ZendTestMagicCall(void)
526 {
527 zend_class_entry ce, *class_entry;
528
529 INIT_CLASS_ENTRY(ce, "_ZendTestMagicCall", class__ZendTestMagicCall_methods);
530 class_entry = zend_register_internal_class_ex(&ce, NULL);
531
532 return class_entry;
533 }
534
register_class__ZendTestChildClass(zend_class_entry * class_entry__ZendTestClass)535 static zend_class_entry *register_class__ZendTestChildClass(zend_class_entry *class_entry__ZendTestClass)
536 {
537 zend_class_entry ce, *class_entry;
538
539 INIT_CLASS_ENTRY(ce, "_ZendTestChildClass", class__ZendTestChildClass_methods);
540 class_entry = zend_register_internal_class_ex(&ce, class_entry__ZendTestClass);
541
542 return class_entry;
543 }
544
register_class__ZendTestTrait(void)545 static zend_class_entry *register_class__ZendTestTrait(void)
546 {
547 zend_class_entry ce, *class_entry;
548
549 INIT_CLASS_ENTRY(ce, "_ZendTestTrait", class__ZendTestTrait_methods);
550 class_entry = zend_register_internal_class_ex(&ce, NULL);
551 class_entry->ce_flags |= ZEND_ACC_TRAIT;
552
553 zval property_testProp_default_value;
554 ZVAL_NULL(&property_testProp_default_value);
555 zend_string *property_testProp_name = zend_string_init("testProp", sizeof("testProp") - 1, 1);
556 zend_declare_property_ex(class_entry, property_testProp_name, &property_testProp_default_value, ZEND_ACC_PUBLIC, NULL);
557 zend_string_release(property_testProp_name);
558
559 zend_string *property_classUnionProp_class_Traversable = zend_string_init("Traversable", sizeof("Traversable") - 1, 1);
560 zend_string *property_classUnionProp_class_Countable = zend_string_init("Countable", sizeof("Countable") - 1, 1);
561 zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
562 property_classUnionProp_type_list->num_types = 2;
563 property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Traversable, 0, 0);
564 property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Countable, 0, 0);
565 zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, 0);
566 zval property_classUnionProp_default_value;
567 ZVAL_UNDEF(&property_classUnionProp_default_value);
568 zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
569 zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
570 zend_string_release(property_classUnionProp_name);
571
572 return class_entry;
573 }
574
register_class_ZendTestAttribute(void)575 static zend_class_entry *register_class_ZendTestAttribute(void)
576 {
577 zend_class_entry ce, *class_entry;
578
579 INIT_CLASS_ENTRY(ce, "ZendTestAttribute", class_ZendTestAttribute_methods);
580 class_entry = zend_register_internal_class_ex(&ce, NULL);
581 class_entry->ce_flags |= ZEND_ACC_FINAL;
582
583 #if (PHP_VERSION_ID >= 80200)
584 zend_string *attribute_name_Attribute_class_ZendTestAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
585 zend_attribute *attribute_Attribute_class_ZendTestAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestAttribute, 1);
586 zend_string_release(attribute_name_Attribute_class_ZendTestAttribute);
587 zval attribute_Attribute_class_ZendTestAttribute_arg0;
588 ZVAL_LONG(&attribute_Attribute_class_ZendTestAttribute_arg0, ZEND_ATTRIBUTE_TARGET_ALL);
589 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestAttribute->args[0].value, &attribute_Attribute_class_ZendTestAttribute_arg0);
590 #endif
591
592 return class_entry;
593 }
594
register_class_ZendTestParameterAttribute(void)595 static zend_class_entry *register_class_ZendTestParameterAttribute(void)
596 {
597 zend_class_entry ce, *class_entry;
598
599 INIT_CLASS_ENTRY(ce, "ZendTestParameterAttribute", class_ZendTestParameterAttribute_methods);
600 class_entry = zend_register_internal_class_ex(&ce, NULL);
601 class_entry->ce_flags |= ZEND_ACC_FINAL;
602
603 zval property_parameter_default_value;
604 ZVAL_UNDEF(&property_parameter_default_value);
605 zend_string *property_parameter_name = zend_string_init("parameter", sizeof("parameter") - 1, 1);
606 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));
607 zend_string_release(property_parameter_name);
608
609 #if (PHP_VERSION_ID >= 80200)
610 zend_string *attribute_name_Attribute_class_ZendTestParameterAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
611 zend_attribute *attribute_Attribute_class_ZendTestParameterAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestParameterAttribute, 1);
612 zend_string_release(attribute_name_Attribute_class_ZendTestParameterAttribute);
613 zval attribute_Attribute_class_ZendTestParameterAttribute_arg0;
614 ZVAL_LONG(&attribute_Attribute_class_ZendTestParameterAttribute_arg0, ZEND_ATTRIBUTE_TARGET_PARAMETER);
615 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestParameterAttribute->args[0].value, &attribute_Attribute_class_ZendTestParameterAttribute_arg0);
616 #endif
617
618 return class_entry;
619 }
620
register_class_ZendTestPropertyAttribute(void)621 static zend_class_entry *register_class_ZendTestPropertyAttribute(void)
622 {
623 zend_class_entry ce, *class_entry;
624
625 INIT_CLASS_ENTRY(ce, "ZendTestPropertyAttribute", class_ZendTestPropertyAttribute_methods);
626 class_entry = zend_register_internal_class_ex(&ce, NULL);
627 class_entry->ce_flags |= ZEND_ACC_FINAL;
628
629 zval property_parameter_default_value;
630 ZVAL_UNDEF(&property_parameter_default_value);
631 zend_string *property_parameter_name = zend_string_init("parameter", sizeof("parameter") - 1, 1);
632 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));
633 zend_string_release(property_parameter_name);
634
635 #if (PHP_VERSION_ID >= 80200)
636 zend_string *attribute_name_Attribute_class_ZendTestPropertyAttribute = zend_string_init_interned("Attribute", sizeof("Attribute") - 1, 1);
637 zend_attribute *attribute_Attribute_class_ZendTestPropertyAttribute = zend_add_class_attribute(class_entry, attribute_name_Attribute_class_ZendTestPropertyAttribute, 1);
638 zend_string_release(attribute_name_Attribute_class_ZendTestPropertyAttribute);
639 zval attribute_Attribute_class_ZendTestPropertyAttribute_arg0;
640 ZVAL_LONG(&attribute_Attribute_class_ZendTestPropertyAttribute_arg0, ZEND_ATTRIBUTE_TARGET_PROPERTY);
641 ZVAL_COPY_VALUE(&attribute_Attribute_class_ZendTestPropertyAttribute->args[0].value, &attribute_Attribute_class_ZendTestPropertyAttribute_arg0);
642 #endif
643
644 return class_entry;
645 }
646
register_class_ZendTestClassWithMethodWithParameterAttribute(void)647 static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttribute(void)
648 {
649 zend_class_entry ce, *class_entry;
650
651 INIT_CLASS_ENTRY(ce, "ZendTestClassWithMethodWithParameterAttribute", class_ZendTestClassWithMethodWithParameterAttribute_methods);
652 class_entry = zend_register_internal_class_ex(&ce, NULL);
653
654 return class_entry;
655 }
656
register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_class_entry * class_entry_ZendTestClassWithMethodWithParameterAttribute)657 static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_class_entry *class_entry_ZendTestClassWithMethodWithParameterAttribute)
658 {
659 zend_class_entry ce, *class_entry;
660
661 INIT_CLASS_ENTRY(ce, "ZendTestChildClassWithMethodWithParameterAttribute", class_ZendTestChildClassWithMethodWithParameterAttribute_methods);
662 class_entry = zend_register_internal_class_ex(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute);
663
664 return class_entry;
665 }
666
register_class_ZendTestForbidDynamicCall(void)667 static zend_class_entry *register_class_ZendTestForbidDynamicCall(void)
668 {
669 zend_class_entry ce, *class_entry;
670
671 INIT_CLASS_ENTRY(ce, "ZendTestForbidDynamicCall", class_ZendTestForbidDynamicCall_methods);
672 class_entry = zend_register_internal_class_ex(&ce, NULL);
673 class_entry->ce_flags |= ZEND_ACC_FINAL;
674
675 return class_entry;
676 }
677
678 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestUnitEnum(void)679 static zend_class_entry *register_class_ZendTestUnitEnum(void)
680 {
681 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestUnitEnum", IS_UNDEF, class_ZendTestUnitEnum_methods);
682
683 zend_enum_add_case_cstr(class_entry, "Foo", NULL);
684
685 zend_enum_add_case_cstr(class_entry, "Bar", NULL);
686
687 return class_entry;
688 }
689 #endif
690
691 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestStringEnum(void)692 static zend_class_entry *register_class_ZendTestStringEnum(void)
693 {
694 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestStringEnum", IS_STRING, class_ZendTestStringEnum_methods);
695
696 zval enum_case_Foo_value;
697 zend_string *enum_case_Foo_value_str = zend_string_init("Test1", strlen("Test1"), 1);
698 ZVAL_STR(&enum_case_Foo_value, enum_case_Foo_value_str);
699 zend_enum_add_case_cstr(class_entry, "Foo", &enum_case_Foo_value);
700
701 zval enum_case_Bar_value;
702 zend_string *enum_case_Bar_value_str = zend_string_init("Test2", strlen("Test2"), 1);
703 ZVAL_STR(&enum_case_Bar_value, enum_case_Bar_value_str);
704 zend_enum_add_case_cstr(class_entry, "Bar", &enum_case_Bar_value);
705
706 zval enum_case_Baz_value;
707 zend_string *enum_case_Baz_value_str = zend_string_init("Test2\\a", strlen("Test2\\a"), 1);
708 ZVAL_STR(&enum_case_Baz_value, enum_case_Baz_value_str);
709 zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
710
711 zval enum_case_FortyTwo_value;
712 zend_string *enum_case_FortyTwo_value_str = zend_string_init("42", strlen("42"), 1);
713 ZVAL_STR(&enum_case_FortyTwo_value, enum_case_FortyTwo_value_str);
714 zend_enum_add_case_cstr(class_entry, "FortyTwo", &enum_case_FortyTwo_value);
715
716 return class_entry;
717 }
718 #endif
719
720 #if (PHP_VERSION_ID >= 80100)
register_class_ZendTestIntEnum(void)721 static zend_class_entry *register_class_ZendTestIntEnum(void)
722 {
723 zend_class_entry *class_entry = zend_register_internal_enum("ZendTestIntEnum", IS_LONG, class_ZendTestIntEnum_methods);
724
725 zval enum_case_Foo_value;
726 ZVAL_LONG(&enum_case_Foo_value, 1);
727 zend_enum_add_case_cstr(class_entry, "Foo", &enum_case_Foo_value);
728
729 zval enum_case_Bar_value;
730 ZVAL_LONG(&enum_case_Bar_value, 3);
731 zend_enum_add_case_cstr(class_entry, "Bar", &enum_case_Bar_value);
732
733 zval enum_case_Baz_value;
734 ZVAL_LONG(&enum_case_Baz_value, -1);
735 zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
736
737 return class_entry;
738 }
739 #endif
740
register_class_ZendTestNS_Foo(void)741 static zend_class_entry *register_class_ZendTestNS_Foo(void)
742 {
743 zend_class_entry ce, *class_entry;
744
745 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "Foo", class_ZendTestNS_Foo_methods);
746 class_entry = zend_register_internal_class_ex(&ce, NULL);
747
748 return class_entry;
749 }
750
register_class_ZendTestNS_UnlikelyCompileError(void)751 static zend_class_entry *register_class_ZendTestNS_UnlikelyCompileError(void)
752 {
753 zend_class_entry ce, *class_entry;
754
755 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "UnlikelyCompileError", class_ZendTestNS_UnlikelyCompileError_methods);
756 class_entry = zend_register_internal_class_ex(&ce, NULL);
757
758 return class_entry;
759 }
760
register_class_ZendTestNS_NotUnlikelyCompileError(void)761 static zend_class_entry *register_class_ZendTestNS_NotUnlikelyCompileError(void)
762 {
763 zend_class_entry ce, *class_entry;
764
765 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "NotUnlikelyCompileError", class_ZendTestNS_NotUnlikelyCompileError_methods);
766 class_entry = zend_register_internal_class_ex(&ce, NULL);
767
768 return class_entry;
769 }
770
register_class_ZendTestNS2_Foo(void)771 static zend_class_entry *register_class_ZendTestNS2_Foo(void)
772 {
773 zend_class_entry ce, *class_entry;
774
775 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2", "Foo", class_ZendTestNS2_Foo_methods);
776 class_entry = zend_register_internal_class_ex(&ce, NULL);
777
778 zend_string *property_foo_class_ZendTestNS2_ZendSubNS_Foo = zend_string_init("ZendTestNS2\\ZendSubNS\\Foo", sizeof("ZendTestNS2\\ZendSubNS\\Foo")-1, 1);
779 zval property_foo_default_value;
780 ZVAL_UNDEF(&property_foo_default_value);
781 zend_string *property_foo_name = zend_string_init("foo", sizeof("foo") - 1, 1);
782 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));
783 zend_string_release(property_foo_name);
784
785 return class_entry;
786 }
787
register_class_ZendTestNS2_ZendSubNS_Foo(void)788 static zend_class_entry *register_class_ZendTestNS2_ZendSubNS_Foo(void)
789 {
790 zend_class_entry ce, *class_entry;
791
792 INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2\\ZendSubNS", "Foo", class_ZendTestNS2_ZendSubNS_Foo_methods);
793 class_entry = zend_register_internal_class_ex(&ce, NULL);
794
795 return class_entry;
796 }
797