test_arginfo.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. /* This is a generated file, edit the .stub.php file instead.
  2. * Stub hash: 27df6a7b48574b5c6c9a54c618fce300c7a8bd13 */
  3. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0)
  4. ZEND_END_ARG_INFO()
  5. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_nullable_array_return, 0, 0, IS_ARRAY, 1)
  6. ZEND_END_ARG_INFO()
  7. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_void_return, 0, 0, IS_VOID, 0)
  8. ZEND_END_ARG_INFO()
  9. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_deprecated, 0, 0, IS_VOID, 0)
  10. ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg, IS_MIXED, 0, "null")
  11. ZEND_END_ARG_INFO()
  12. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_create_unterminated_string, 0, 1, IS_STRING, 0)
  13. ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
  14. ZEND_END_ARG_INFO()
  15. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_terminate_string, 0, 1, IS_VOID, 0)
  16. ZEND_ARG_TYPE_INFO(1, str, IS_STRING, 0)
  17. ZEND_END_ARG_INFO()
  18. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_variable, 0, 1, IS_VOID, 0)
  19. ZEND_ARG_TYPE_INFO(0, variable, IS_MIXED, 0)
  20. ZEND_END_ARG_INFO()
  21. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_leak_bytes, 0, 0, IS_VOID, 0)
  22. ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, bytes, IS_LONG, 0, "3")
  23. ZEND_END_ARG_INFO()
  24. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_zend_string_or_object, 0, 1, MAY_BE_OBJECT|MAY_BE_STRING)
  25. ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING, NULL)
  26. ZEND_END_ARG_INFO()
  27. 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)
  28. ZEND_ARG_TYPE_MASK(0, param, MAY_BE_OBJECT|MAY_BE_STRING|MAY_BE_NULL, NULL)
  29. ZEND_END_ARG_INFO()
  30. ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_zend_string_or_stdclass, 0, 1, stdClass, MAY_BE_STRING)
  31. ZEND_ARG_INFO(0, param)
  32. ZEND_END_ARG_INFO()
  33. 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)
  34. ZEND_ARG_INFO(0, param)
  35. ZEND_END_ARG_INFO()
  36. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_iterable, 0, 1, IS_VOID, 0)
  37. ZEND_ARG_TYPE_INFO(0, arg1, IS_ITERABLE, 0)
  38. ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, arg2, IS_ITERABLE, 1, "null")
  39. ZEND_END_ARG_INFO()
  40. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_attach, 0, 2, _IS_BOOL, 0)
  41. ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
  42. ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
  43. ZEND_END_ARG_INFO()
  44. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_weakmap_remove, 0, 1, _IS_BOOL, 0)
  45. ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0)
  46. ZEND_END_ARG_INFO()
  47. #define arginfo_zend_weakmap_dump arginfo_zend_test_array_return
  48. ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_zend_get_unit_enum, 0, 0, ZendTestUnitEnum, 0)
  49. ZEND_END_ARG_INFO()
  50. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_parameter_with_attribute, 0, 1, IS_LONG, 0)
  51. ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
  52. ZEND_END_ARG_INFO()
  53. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_current_func_name, 0, 0, IS_STRING, 0)
  54. ZEND_END_ARG_INFO()
  55. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_call_method, 0, 2, IS_MIXED, 0)
  56. ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0)
  57. ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
  58. ZEND_ARG_TYPE_INFO(0, arg1, IS_MIXED, 0)
  59. ZEND_ARG_TYPE_INFO(0, arg2, IS_MIXED, 0)
  60. ZEND_END_ARG_INFO()
  61. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, 0, _IS_BOOL, 0)
  62. ZEND_END_ARG_INFO()
  63. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_is_object, 0, 0, IS_LONG, 0)
  64. ZEND_END_ARG_INFO()
  65. ZEND_BEGIN_ARG_INFO_EX(arginfo_class__ZendTestClass___toString, 0, 0, 0)
  66. ZEND_END_ARG_INFO()
  67. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class__ZendTestClass_returnsStatic, 0, 0, IS_STATIC, 0)
  68. ZEND_END_ARG_INFO()
  69. ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestClass_returnsThrowable, 0, 0, Throwable, 0)
  70. ZEND_END_ARG_INFO()
  71. ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class__ZendTestChildClass_returnsThrowable, 0, 0, Exception, 0)
  72. ZEND_END_ARG_INFO()
  73. #define arginfo_class__ZendTestTrait_testMethod arginfo_ZendTestNS2_ZendSubNS_namespaced_func
  74. ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZendTestParameterAttribute___construct, 0, 0, 1)
  75. ZEND_ARG_TYPE_INFO(0, parameter, IS_STRING, 0)
  76. ZEND_END_ARG_INFO()
  77. #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override arginfo_zend_test_parameter_with_attribute
  78. #define arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
  79. #define arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override arginfo_zend_test_parameter_with_attribute
  80. #define arginfo_class_ZendTestNS_Foo_method arginfo_zend_test_void_return
  81. #define arginfo_class_ZendTestNS2_Foo_method arginfo_zend_test_void_return
  82. #define arginfo_class_ZendTestNS2_ZendSubNS_Foo_method arginfo_zend_test_void_return
  83. static ZEND_FUNCTION(zend_test_array_return);
  84. static ZEND_FUNCTION(zend_test_nullable_array_return);
  85. static ZEND_FUNCTION(zend_test_void_return);
  86. static ZEND_FUNCTION(zend_test_deprecated);
  87. static ZEND_FUNCTION(zend_create_unterminated_string);
  88. static ZEND_FUNCTION(zend_terminate_string);
  89. static ZEND_FUNCTION(zend_leak_variable);
  90. static ZEND_FUNCTION(zend_leak_bytes);
  91. static ZEND_FUNCTION(zend_string_or_object);
  92. static ZEND_FUNCTION(zend_string_or_object_or_null);
  93. static ZEND_FUNCTION(zend_string_or_stdclass);
  94. static ZEND_FUNCTION(zend_string_or_stdclass_or_null);
  95. static ZEND_FUNCTION(zend_iterable);
  96. static ZEND_FUNCTION(zend_weakmap_attach);
  97. static ZEND_FUNCTION(zend_weakmap_remove);
  98. static ZEND_FUNCTION(zend_weakmap_dump);
  99. static ZEND_FUNCTION(zend_get_unit_enum);
  100. static ZEND_FUNCTION(zend_test_parameter_with_attribute);
  101. static ZEND_FUNCTION(zend_get_current_func_name);
  102. static ZEND_FUNCTION(zend_call_method);
  103. static ZEND_FUNCTION(namespaced_func);
  104. static ZEND_METHOD(_ZendTestClass, is_object);
  105. static ZEND_METHOD(_ZendTestClass, __toString);
  106. static ZEND_METHOD(_ZendTestClass, returnsStatic);
  107. static ZEND_METHOD(_ZendTestClass, returnsThrowable);
  108. static ZEND_METHOD(_ZendTestChildClass, returnsThrowable);
  109. static ZEND_METHOD(_ZendTestTrait, testMethod);
  110. static ZEND_METHOD(ZendTestParameterAttribute, __construct);
  111. static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, no_override);
  112. static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, override);
  113. static ZEND_METHOD(ZendTestChildClassWithMethodWithParameterAttribute, override);
  114. static ZEND_METHOD(ZendTestNS_Foo, method);
  115. static ZEND_METHOD(ZendTestNS2_Foo, method);
  116. static ZEND_METHOD(ZendTestNS2_ZendSubNS_Foo, method);
  117. static const zend_function_entry ext_functions[] = {
  118. ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return)
  119. ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return)
  120. ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return)
  121. ZEND_DEP_FE(zend_test_deprecated, arginfo_zend_test_deprecated)
  122. ZEND_FE(zend_create_unterminated_string, arginfo_zend_create_unterminated_string)
  123. ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string)
  124. ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable)
  125. ZEND_FE(zend_leak_bytes, arginfo_zend_leak_bytes)
  126. ZEND_FE(zend_string_or_object, arginfo_zend_string_or_object)
  127. ZEND_FE(zend_string_or_object_or_null, arginfo_zend_string_or_object_or_null)
  128. ZEND_FE(zend_string_or_stdclass, arginfo_zend_string_or_stdclass)
  129. ZEND_FE(zend_string_or_stdclass_or_null, arginfo_zend_string_or_stdclass_or_null)
  130. ZEND_FE(zend_iterable, arginfo_zend_iterable)
  131. ZEND_FE(zend_weakmap_attach, arginfo_zend_weakmap_attach)
  132. ZEND_FE(zend_weakmap_remove, arginfo_zend_weakmap_remove)
  133. ZEND_FE(zend_weakmap_dump, arginfo_zend_weakmap_dump)
  134. ZEND_FE(zend_get_unit_enum, arginfo_zend_get_unit_enum)
  135. ZEND_FE(zend_test_parameter_with_attribute, arginfo_zend_test_parameter_with_attribute)
  136. ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name)
  137. ZEND_FE(zend_call_method, arginfo_zend_call_method)
  138. ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func)
  139. ZEND_FE_END
  140. };
  141. static const zend_function_entry class__ZendTestInterface_methods[] = {
  142. ZEND_FE_END
  143. };
  144. static const zend_function_entry class__ZendTestClass_methods[] = {
  145. ZEND_ME(_ZendTestClass, is_object, arginfo_class__ZendTestClass_is_object, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
  146. ZEND_ME(_ZendTestClass, __toString, arginfo_class__ZendTestClass___toString, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
  147. ZEND_ME(_ZendTestClass, returnsStatic, arginfo_class__ZendTestClass_returnsStatic, ZEND_ACC_PUBLIC)
  148. ZEND_ME(_ZendTestClass, returnsThrowable, arginfo_class__ZendTestClass_returnsThrowable, ZEND_ACC_PUBLIC)
  149. ZEND_FE_END
  150. };
  151. static const zend_function_entry class__ZendTestChildClass_methods[] = {
  152. ZEND_ME(_ZendTestChildClass, returnsThrowable, arginfo_class__ZendTestChildClass_returnsThrowable, ZEND_ACC_PUBLIC)
  153. ZEND_FE_END
  154. };
  155. static const zend_function_entry class__ZendTestTrait_methods[] = {
  156. ZEND_ME(_ZendTestTrait, testMethod, arginfo_class__ZendTestTrait_testMethod, ZEND_ACC_PUBLIC)
  157. ZEND_FE_END
  158. };
  159. static const zend_function_entry class_ZendTestAttribute_methods[] = {
  160. ZEND_FE_END
  161. };
  162. static const zend_function_entry class_ZendTestParameterAttribute_methods[] = {
  163. ZEND_ME(ZendTestParameterAttribute, __construct, arginfo_class_ZendTestParameterAttribute___construct, ZEND_ACC_PUBLIC)
  164. ZEND_FE_END
  165. };
  166. static const zend_function_entry class_ZendTestClassWithMethodWithParameterAttribute_methods[] = {
  167. ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, no_override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_no_override, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
  168. ZEND_ME(ZendTestClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
  169. ZEND_FE_END
  170. };
  171. static const zend_function_entry class_ZendTestChildClassWithMethodWithParameterAttribute_methods[] = {
  172. ZEND_ME(ZendTestChildClassWithMethodWithParameterAttribute, override, arginfo_class_ZendTestChildClassWithMethodWithParameterAttribute_override, ZEND_ACC_PUBLIC)
  173. ZEND_FE_END
  174. };
  175. static const zend_function_entry class_ZendTestUnitEnum_methods[] = {
  176. ZEND_FE_END
  177. };
  178. static const zend_function_entry class_ZendTestStringEnum_methods[] = {
  179. ZEND_FE_END
  180. };
  181. static const zend_function_entry class_ZendTestNS_Foo_methods[] = {
  182. ZEND_ME(ZendTestNS_Foo, method, arginfo_class_ZendTestNS_Foo_method, ZEND_ACC_PUBLIC)
  183. ZEND_FE_END
  184. };
  185. static const zend_function_entry class_ZendTestNS2_Foo_methods[] = {
  186. ZEND_ME(ZendTestNS2_Foo, method, arginfo_class_ZendTestNS2_Foo_method, ZEND_ACC_PUBLIC)
  187. ZEND_FE_END
  188. };
  189. static const zend_function_entry class_ZendTestNS2_ZendSubNS_Foo_methods[] = {
  190. ZEND_ME(ZendTestNS2_ZendSubNS_Foo, method, arginfo_class_ZendTestNS2_ZendSubNS_Foo_method, ZEND_ACC_PUBLIC)
  191. ZEND_FE_END
  192. };
  193. static zend_class_entry *register_class__ZendTestInterface(void)
  194. {
  195. zend_class_entry ce, *class_entry;
  196. INIT_CLASS_ENTRY(ce, "_ZendTestInterface", class__ZendTestInterface_methods);
  197. class_entry = zend_register_internal_interface(&ce);
  198. return class_entry;
  199. }
  200. static zend_class_entry *register_class__ZendTestClass(zend_class_entry *class_entry__ZendTestInterface)
  201. {
  202. zend_class_entry ce, *class_entry;
  203. INIT_CLASS_ENTRY(ce, "_ZendTestClass", class__ZendTestClass_methods);
  204. class_entry = zend_register_internal_class_ex(&ce, NULL);
  205. zend_class_implements(class_entry, 1, class_entry__ZendTestInterface);
  206. zend_register_class_alias("_ZendTestClassAlias", class_entry);
  207. zval property__StaticProp_default_value;
  208. ZVAL_NULL(&property__StaticProp_default_value);
  209. zend_string *property__StaticProp_name = zend_string_init("_StaticProp", sizeof("_StaticProp") - 1, 1);
  210. zend_declare_property_ex(class_entry, property__StaticProp_name, &property__StaticProp_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC, NULL);
  211. zend_string_release(property__StaticProp_name);
  212. zval property_staticIntProp_default_value;
  213. ZVAL_LONG(&property_staticIntProp_default_value, 123);
  214. zend_string *property_staticIntProp_name = zend_string_init("staticIntProp", sizeof("staticIntProp") - 1, 1);
  215. 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));
  216. zend_string_release(property_staticIntProp_name);
  217. zval property_intProp_default_value;
  218. ZVAL_LONG(&property_intProp_default_value, 123);
  219. zend_string *property_intProp_name = zend_string_init("intProp", sizeof("intProp") - 1, 1);
  220. 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));
  221. zend_string_release(property_intProp_name);
  222. zend_string *property_classProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass")-1, 1);
  223. zval property_classProp_default_value;
  224. ZVAL_NULL(&property_classProp_default_value);
  225. zend_string *property_classProp_name = zend_string_init("classProp", sizeof("classProp") - 1, 1);
  226. 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));
  227. zend_string_release(property_classProp_name);
  228. zend_string *property_classUnionProp_class_stdClass = zend_string_init("stdClass", sizeof("stdClass") - 1, 1);
  229. zend_string *property_classUnionProp_class_Iterator = zend_string_init("Iterator", sizeof("Iterator") - 1, 1);
  230. zend_type_list *property_classUnionProp_type_list = malloc(ZEND_TYPE_LIST_SIZE(2));
  231. property_classUnionProp_type_list->num_types = 2;
  232. property_classUnionProp_type_list->types[0] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_stdClass, 0, 0);
  233. property_classUnionProp_type_list->types[1] = (zend_type) ZEND_TYPE_INIT_CLASS(property_classUnionProp_class_Iterator, 0, 0);
  234. zend_type property_classUnionProp_type = ZEND_TYPE_INIT_UNION(property_classUnionProp_type_list, MAY_BE_NULL);
  235. zval property_classUnionProp_default_value;
  236. ZVAL_NULL(&property_classUnionProp_default_value);
  237. zend_string *property_classUnionProp_name = zend_string_init("classUnionProp", sizeof("classUnionProp") - 1, 1);
  238. zend_declare_typed_property(class_entry, property_classUnionProp_name, &property_classUnionProp_default_value, ZEND_ACC_PUBLIC, NULL, property_classUnionProp_type);
  239. zend_string_release(property_classUnionProp_name);
  240. zval property_readonlyProp_default_value;
  241. ZVAL_UNDEF(&property_readonlyProp_default_value);
  242. zend_string *property_readonlyProp_name = zend_string_init("readonlyProp", sizeof("readonlyProp") - 1, 1);
  243. 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));
  244. zend_string_release(property_readonlyProp_name);
  245. return class_entry;
  246. }
  247. static zend_class_entry *register_class__ZendTestChildClass(zend_class_entry *class_entry__ZendTestClass)
  248. {
  249. zend_class_entry ce, *class_entry;
  250. INIT_CLASS_ENTRY(ce, "_ZendTestChildClass", class__ZendTestChildClass_methods);
  251. class_entry = zend_register_internal_class_ex(&ce, class_entry__ZendTestClass);
  252. return class_entry;
  253. }
  254. static zend_class_entry *register_class__ZendTestTrait(void)
  255. {
  256. zend_class_entry ce, *class_entry;
  257. INIT_CLASS_ENTRY(ce, "_ZendTestTrait", class__ZendTestTrait_methods);
  258. class_entry = zend_register_internal_class_ex(&ce, NULL);
  259. class_entry->ce_flags |= ZEND_ACC_TRAIT;
  260. zval property_testProp_default_value;
  261. ZVAL_NULL(&property_testProp_default_value);
  262. zend_string *property_testProp_name = zend_string_init("testProp", sizeof("testProp") - 1, 1);
  263. zend_declare_property_ex(class_entry, property_testProp_name, &property_testProp_default_value, ZEND_ACC_PUBLIC, NULL);
  264. zend_string_release(property_testProp_name);
  265. return class_entry;
  266. }
  267. static zend_class_entry *register_class_ZendTestAttribute(void)
  268. {
  269. zend_class_entry ce, *class_entry;
  270. INIT_CLASS_ENTRY(ce, "ZendTestAttribute", class_ZendTestAttribute_methods);
  271. class_entry = zend_register_internal_class_ex(&ce, NULL);
  272. class_entry->ce_flags |= ZEND_ACC_FINAL;
  273. return class_entry;
  274. }
  275. static zend_class_entry *register_class_ZendTestParameterAttribute(void)
  276. {
  277. zend_class_entry ce, *class_entry;
  278. INIT_CLASS_ENTRY(ce, "ZendTestParameterAttribute", class_ZendTestParameterAttribute_methods);
  279. class_entry = zend_register_internal_class_ex(&ce, NULL);
  280. class_entry->ce_flags |= ZEND_ACC_FINAL;
  281. zval property_parameter_default_value;
  282. ZVAL_UNDEF(&property_parameter_default_value);
  283. zend_string *property_parameter_name = zend_string_init("parameter", sizeof("parameter") - 1, 1);
  284. 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));
  285. zend_string_release(property_parameter_name);
  286. return class_entry;
  287. }
  288. static zend_class_entry *register_class_ZendTestClassWithMethodWithParameterAttribute(void)
  289. {
  290. zend_class_entry ce, *class_entry;
  291. INIT_CLASS_ENTRY(ce, "ZendTestClassWithMethodWithParameterAttribute", class_ZendTestClassWithMethodWithParameterAttribute_methods);
  292. class_entry = zend_register_internal_class_ex(&ce, NULL);
  293. return class_entry;
  294. }
  295. static zend_class_entry *register_class_ZendTestChildClassWithMethodWithParameterAttribute(zend_class_entry *class_entry_ZendTestClassWithMethodWithParameterAttribute)
  296. {
  297. zend_class_entry ce, *class_entry;
  298. INIT_CLASS_ENTRY(ce, "ZendTestChildClassWithMethodWithParameterAttribute", class_ZendTestChildClassWithMethodWithParameterAttribute_methods);
  299. class_entry = zend_register_internal_class_ex(&ce, class_entry_ZendTestClassWithMethodWithParameterAttribute);
  300. return class_entry;
  301. }
  302. static zend_class_entry *register_class_ZendTestUnitEnum(void)
  303. {
  304. zend_class_entry *class_entry = zend_register_internal_enum("ZendTestUnitEnum", IS_UNDEF, class_ZendTestUnitEnum_methods);
  305. zend_enum_add_case_cstr(class_entry, "Foo", NULL);
  306. zend_enum_add_case_cstr(class_entry, "Bar", NULL);
  307. return class_entry;
  308. }
  309. static zend_class_entry *register_class_ZendTestStringEnum(void)
  310. {
  311. zend_class_entry *class_entry = zend_register_internal_enum("ZendTestStringEnum", IS_STRING, class_ZendTestStringEnum_methods);
  312. zval enum_case_Foo_value;
  313. zend_string *enum_case_Foo_value_str = zend_string_init("Test1", sizeof("Test1") - 1, 1);
  314. ZVAL_STR(&enum_case_Foo_value, enum_case_Foo_value_str);
  315. zend_enum_add_case_cstr(class_entry, "Foo", &enum_case_Foo_value);
  316. zval enum_case_Bar_value;
  317. zend_string *enum_case_Bar_value_str = zend_string_init("Test2", sizeof("Test2") - 1, 1);
  318. ZVAL_STR(&enum_case_Bar_value, enum_case_Bar_value_str);
  319. zend_enum_add_case_cstr(class_entry, "Bar", &enum_case_Bar_value);
  320. zval enum_case_Baz_value;
  321. zend_string *enum_case_Baz_value_str = zend_string_init("Test2\\a", sizeof("Test2\\a") - 1, 1);
  322. ZVAL_STR(&enum_case_Baz_value, enum_case_Baz_value_str);
  323. zend_enum_add_case_cstr(class_entry, "Baz", &enum_case_Baz_value);
  324. zval enum_case_FortyTwo_value;
  325. zend_string *enum_case_FortyTwo_value_str = zend_string_init("42", sizeof("42") - 1, 1);
  326. ZVAL_STR(&enum_case_FortyTwo_value, enum_case_FortyTwo_value_str);
  327. zend_enum_add_case_cstr(class_entry, "FortyTwo", &enum_case_FortyTwo_value);
  328. return class_entry;
  329. }
  330. static zend_class_entry *register_class_ZendTestNS_Foo(void)
  331. {
  332. zend_class_entry ce, *class_entry;
  333. INIT_NS_CLASS_ENTRY(ce, "ZendTestNS", "Foo", class_ZendTestNS_Foo_methods);
  334. class_entry = zend_register_internal_class_ex(&ce, NULL);
  335. return class_entry;
  336. }
  337. static zend_class_entry *register_class_ZendTestNS2_Foo(void)
  338. {
  339. zend_class_entry ce, *class_entry;
  340. INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2", "Foo", class_ZendTestNS2_Foo_methods);
  341. class_entry = zend_register_internal_class_ex(&ce, NULL);
  342. zend_string *property_foo_class_ZendTestNS2_ZendSubNS_Foo = zend_string_init("ZendTestNS2\\ZendSubNS\\Foo", sizeof("ZendTestNS2\\ZendSubNS\\Foo")-1, 1);
  343. zval property_foo_default_value;
  344. ZVAL_UNDEF(&property_foo_default_value);
  345. zend_string *property_foo_name = zend_string_init("foo", sizeof("foo") - 1, 1);
  346. 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));
  347. zend_string_release(property_foo_name);
  348. return class_entry;
  349. }
  350. static zend_class_entry *register_class_ZendTestNS2_ZendSubNS_Foo(void)
  351. {
  352. zend_class_entry ce, *class_entry;
  353. INIT_NS_CLASS_ENTRY(ce, "ZendTestNS2\\ZendSubNS", "Foo", class_ZendTestNS2_ZendSubNS_Foo_methods);
  354. class_entry = zend_register_internal_class_ex(&ce, NULL);
  355. return class_entry;
  356. }