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