67#define ZEND_NS_NAME(ns, name) ns "\\" name
71#define ZEND_FN(name) zif_##name
72#define ZEND_MN(name) zim_##name
74#define ZEND_NAMED_FUNCTION(name) void ZEND_FASTCALL name(INTERNAL_FUNCTION_PARAMETERS)
75#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(zif_##name)
76#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(zim_##classname##_##name)
78#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags, NULL, NULL },
80#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags, frameless_function_infos, doc_comment) { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags, frameless_function_infos, doc_comment },
83#define ZEND_RAW_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0, NULL, NULL)
85#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0, NULL, NULL)
86#define ZEND_FE(name, arg_info) ZEND_RAW_FENTRY(#name, zif_##name, arg_info, 0, NULL, NULL)
87#define ZEND_DEP_FE(name, arg_info) ZEND_RAW_FENTRY(#name, zif_##name, arg_info, ZEND_ACC_DEPRECATED, NULL, NULL)
88#define ZEND_FALIAS(name, alias, arg_info) ZEND_RAW_FENTRY(#name, zif_##alias, arg_info, 0, NULL, NULL)
89#define ZEND_DEP_FALIAS(name, alias, arg_info) ZEND_RAW_FENTRY(#name, zif_##alias, arg_info, ZEND_ACC_DEPRECATED, NULL, NULL)
90#define ZEND_NAMED_ME(zend_name, name, arg_info, flags) ZEND_FENTRY(zend_name, name, arg_info, flags)
91#define ZEND_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags, NULL, NULL)
92#define ZEND_DEP_ME(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##name, arg_info, flags | ZEND_ACC_DEPRECATED, NULL, NULL)
93#define ZEND_ABSTRACT_ME(classname, name, arg_info) ZEND_RAW_FENTRY(#name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT, NULL, NULL)
94#define ZEND_ABSTRACT_ME_WITH_FLAGS(classname, name, arg_info, flags) ZEND_RAW_FENTRY(#name, NULL, arg_info, flags, NULL, NULL)
95#define ZEND_MALIAS(classname, name, alias, arg_info, flags) ZEND_RAW_FENTRY(#name, zim_##classname##_##alias, arg_info, flags, NULL, NULL)
96#define ZEND_ME_MAPPING(name, func_name, arg_info, flags) ZEND_RAW_FENTRY(#name, zif_##func_name, arg_info, flags, NULL, NULL)
97#define ZEND_FRAMELESS_FE(name, arg_info, flags, frameless_function_infos, doc_comment) \
98 { #name, zif_##name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_internal_arg_info)-1), flags, frameless_function_infos, doc_comment },
100#define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags, NULL, NULL)
102#define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags, NULL, NULL)
113#define ZEND_SUPPORTS_COMPILE_TIME_EVAL_FE(name, arg_info) ZEND_RAW_FENTRY(#name, zif_##name, arg_info, ZEND_ACC_COMPILE_TIME_EVAL, NULL, NULL)
116#define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
118#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
119#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##name, arg_info, 0)
120#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##name, arg_info, ZEND_ACC_DEPRECATED)
121#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##alias, arg_info, 0)
122#define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info) ZEND_NS_RAW_FENTRY(ns, #name, zif_##alias, arg_info, ZEND_ACC_DEPRECATED)
124#define ZEND_FE_END { NULL, NULL, NULL, 0, 0, NULL, NULL }
126#define _ZEND_ARG_INFO_FLAGS(pass_by_ref, is_variadic, is_tentative) \
127 (((pass_by_ref) << _ZEND_SEND_MODE_SHIFT) | ((is_variadic) ? _ZEND_IS_VARIADIC_BIT : 0) | ((is_tentative) ? _ZEND_IS_TENTATIVE_BIT : 0))
130#define ZEND_ARG_INFO(pass_by_ref, name) \
131 { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), NULL },
132#define ZEND_ARG_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, default_value) \
133 { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), default_value },
134#define ZEND_ARG_VARIADIC_INFO(pass_by_ref, name) \
135 { #name, ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(pass_by_ref, 1, 0)), NULL },
138#define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) \
139 { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), NULL },
140#define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value) \
141 { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), default_value },
142#define ZEND_ARG_VARIADIC_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) \
143 { #name, ZEND_TYPE_INIT_CODE(type_hint, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1, 0)), NULL },
146#define ZEND_ARG_TYPE_MASK(pass_by_ref, name, type_mask, default_value) \
147 { #name, ZEND_TYPE_INIT_MASK(type_mask | _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), default_value },
148#define ZEND_ARG_OBJ_TYPE_MASK(pass_by_ref, name, class_name, type_mask, default_value) \
149 { #name, ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type_mask | _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), default_value },
150#define ZEND_ARG_VARIADIC_OBJ_TYPE_MASK(pass_by_ref, name, class_name, type_mask) \
151 { #name, ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type_mask | _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1, 0)), NULL },
154#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, class_name, allow_null) \
155 { #name, ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), NULL },
156#define ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, class_name, allow_null, default_value) \
157 { #name, ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), default_value },
158#define ZEND_ARG_VARIADIC_OBJ_INFO(pass_by_ref, name, class_name, allow_null) \
159 { #name, ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 1, 0)), NULL },
162#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) \
163 { #name, ZEND_TYPE_INIT_CODE(IS_ARRAY, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), NULL },
164#define ZEND_ARG_CALLABLE_INFO(pass_by_ref, name, allow_null) \
165 { #name, ZEND_TYPE_INIT_CODE(IS_CALLABLE, allow_null, _ZEND_ARG_INFO_FLAGS(pass_by_ref, 0, 0)), NULL },
167#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, return_reference, required_num_args, class_name, allow_null, is_tentative_return_type) \
168 static const zend_internal_arg_info name[] = { \
169 { (const char*)(uintptr_t)(required_num_args), \
170 ZEND_TYPE_INIT_CLASS_CONST(#class_name, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
172#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \
173 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, return_reference, required_num_args, class_name, allow_null, 0)
175#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(name, return_reference, required_num_args, class_name, allow_null) \
176 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, return_reference, required_num_args, class_name, allow_null, 1)
178#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO(name, class_name, allow_null) \
179 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX2(name, 0, -1, class_name, allow_null, 0)
181#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, is_tentative_return_type) \
182 static const zend_internal_arg_info name[] = { \
183 { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_MASK(type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
185#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) \
186 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, 0)
188#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(name, return_reference, required_num_args, type) \
189 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX2(name, return_reference, required_num_args, type, 1)
191#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, is_tentative_return_type) \
192 static const zend_internal_arg_info name[] = { \
193 { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CLASS_CONST_MASK(#class_name, type | _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
195#define ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \
196 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, 0)
198#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(name, return_reference, required_num_args, class_name, type) \
199 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX2(name, return_reference, required_num_args, class_name, type, 1)
201#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, is_tentative_return_type) \
202 static const zend_internal_arg_info name[] = { \
203 { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_CODE(type, allow_null, _ZEND_ARG_INFO_FLAGS(return_reference, 0, is_tentative_return_type)), NULL },
205#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
206 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, 0)
208#define ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
209 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, return_reference, required_num_args, type, allow_null, 1)
211#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(name, type, allow_null) \
212 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX2(name, 0, -1, type, allow_null, 0)
214#define ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args) \
215 static const zend_internal_arg_info name[] = { \
216 { (const char*)(uintptr_t)(required_num_args), ZEND_TYPE_INIT_NONE(_ZEND_ARG_INFO_FLAGS(return_reference, 0, 0)), NULL },
217#define ZEND_BEGIN_ARG_INFO(name, _unused) \
218 ZEND_BEGIN_ARG_INFO_EX(name, {}, ZEND_RETURN_VALUE, -1)
219#define ZEND_END_ARG_INFO() };
222#define ZEND_MODULE_STARTUP_N(module) zm_startup_##module
223#define ZEND_MODULE_SHUTDOWN_N(module) zm_shutdown_##module
224#define ZEND_MODULE_ACTIVATE_N(module) zm_activate_##module
225#define ZEND_MODULE_DEACTIVATE_N(module) zm_deactivate_##module
226#define ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module) zm_post_zend_deactivate_##module
227#define ZEND_MODULE_INFO_N(module) zm_info_##module
228#define ZEND_MODULE_GLOBALS_CTOR_N(module) zm_globals_ctor_##module
229#define ZEND_MODULE_GLOBALS_DTOR_N(module) zm_globals_dtor_##module
232#define ZEND_MODULE_STARTUP_D(module) zend_result ZEND_MODULE_STARTUP_N(module)(INIT_FUNC_ARGS)
233#define ZEND_MODULE_SHUTDOWN_D(module) zend_result ZEND_MODULE_SHUTDOWN_N(module)(SHUTDOWN_FUNC_ARGS)
234#define ZEND_MODULE_ACTIVATE_D(module) zend_result ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS)
235#define ZEND_MODULE_DEACTIVATE_D(module) zend_result ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS)
236#define ZEND_MODULE_POST_ZEND_DEACTIVATE_D(module) zend_result ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module)(void)
237#define ZEND_MODULE_INFO_D(module) ZEND_COLD void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)
238#define ZEND_MODULE_GLOBALS_CTOR_D(module) void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals)
239#define ZEND_MODULE_GLOBALS_DTOR_D(module) void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals)
241#define ZEND_GET_MODULE(name) \
243 ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\
246#define ZEND_BEGIN_MODULE_GLOBALS(module_name) \
247 typedef struct _zend_##module_name##_globals {
248#define ZEND_END_MODULE_GLOBALS(module_name) \
249 } zend_##module_name##_globals;
253#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
254 ts_rsrc_id module_name##_globals_id;
255#define ZEND_EXTERN_MODULE_GLOBALS(module_name) \
256 extern ts_rsrc_id module_name##_globals_id;
257#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
258 ts_allocate_id(&module_name##_globals_id, sizeof(zend_##module_name##_globals), (ts_allocate_ctor) globals_ctor, (ts_allocate_dtor) globals_dtor);
259#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) ZEND_TSRMG(module_name##_globals_id, zend_##module_name##_globals *, v)
260#ifdef ZEND_ENABLE_STATIC_TSRMLS_CACHE
261#define ZEND_MODULE_GLOBALS_BULK(module_name) TSRMG_BULK_STATIC(module_name##_globals_id, zend_##module_name##_globals *)
263#define ZEND_MODULE_GLOBALS_BULK(module_name) TSRMG_BULK(module_name##_globals_id, zend_##module_name##_globals *)
268#define ZEND_DECLARE_MODULE_GLOBALS(module_name) \
269 zend_##module_name##_globals module_name##_globals;
270#define ZEND_EXTERN_MODULE_GLOBALS(module_name) \
271 extern zend_##module_name##_globals module_name##_globals;
272#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor) \
273 globals_ctor(&module_name##_globals);
274#define ZEND_MODULE_GLOBALS_ACCESSOR(module_name, v) (module_name##_globals.v)
275#define ZEND_MODULE_GLOBALS_BULK(module_name) (&module_name##_globals)
279#define INIT_CLASS_ENTRY(class_container, class_name, functions) \
280 INIT_CLASS_ENTRY_EX(class_container, class_name, strlen(class_name), functions)
282#define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions) \
284 memset(&class_container, 0, sizeof(zend_class_entry)); \
285 class_container.name = zend_string_init_interned(class_name, class_name_len, 1); \
286 class_container.default_object_handlers = &std_object_handlers; \
287 class_container.info.internal.builtin_functions = functions; \
290#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions) \
292 class_container.default_object_handlers = &std_object_handlers; \
293 class_container.constructor = NULL; \
294 class_container.destructor = NULL; \
295 class_container.clone = NULL; \
296 class_container.serialize = NULL; \
297 class_container.unserialize = NULL; \
298 class_container.create_object = NULL; \
299 class_container.get_static_method = NULL; \
300 class_container.__call = NULL; \
301 class_container.__callstatic = NULL; \
302 class_container.__tostring = NULL; \
303 class_container.__get = NULL; \
304 class_container.__set = NULL; \
305 class_container.__unset = NULL; \
306 class_container.__isset = NULL; \
307 class_container.__debugInfo = NULL; \
308 class_container.__serialize = NULL; \
309 class_container.__unserialize = NULL; \
310 class_container.parent = NULL; \
311 class_container.num_interfaces = 0; \
312 class_container.trait_names = NULL; \
313 class_container.num_traits = 0; \
314 class_container.trait_aliases = NULL; \
315 class_container.trait_precedences = NULL; \
316 class_container.interfaces = NULL; \
317 class_container.get_iterator = NULL; \
318 class_container.iterator_funcs_ptr = NULL; \
319 class_container.arrayaccess_funcs_ptr = NULL; \
320 class_container.info.internal.module = NULL; \
321 class_container.info.internal.builtin_functions = functions; \
325#define INIT_NS_CLASS_ENTRY(class_container, ns, class_name, functions) \
326 INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions)
328#define CE_STATIC_MEMBERS(ce) \
329 ((zval*)ZEND_MAP_PTR_GET((ce)->static_members_table))
331#define CE_CONSTANTS_TABLE(ce) \
332 zend_class_constants_table(ce)
334#define CE_DEFAULT_PROPERTIES_TABLE(ce) \
335 zend_class_default_properties_table(ce)
337#define CE_BACKED_ENUM_TABLE(ce) \
338 zend_class_backed_enum_table(ce)
340#define ZEND_FCI_INITIALIZED(fci) ((fci).size != 0)
341#define ZEND_FCC_INITIALIZED(fcc) ((fcc).function_handler != NULL)
351#define zend_get_parameters_array(ht, param_count, argument_array) \
352 zend_get_parameters_array_ex(param_count, argument_array)
353#define zend_parse_parameters_none() \
354 (EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : (zend_wrong_parameters_none_error(), FAILURE))
355#define zend_parse_parameters_none_throw() \
356 zend_parse_parameters_none()
360#define ZEND_PARSE_PARAMS_THROW 0
361#define ZEND_PARSE_PARAMS_QUIET (1<<1)
365#define zend_parse_parameters_throw(num_args, ...) \
366 zend_parse_parameters(num_args, __VA_ARGS__)
402#define zend_register_ns_class_alias(ns, name, ce) \
403 zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce, 1)
411#define IS_CALLABLE_CHECK_SYNTAX_ONLY (1<<0)
412#define IS_CALLABLE_SUPPRESS_DEPRECATIONS (1<<1)
523#define ZEND_THIS (&EX(This))
525#define hasThis() (Z_TYPE_P(ZEND_THIS) == IS_OBJECT)
526#define getThis() (hasThis() ? ZEND_THIS : NULL)
527#define ZEND_IS_METHOD_CALL() (EX(func)->common.scope != NULL)
529#define WRONG_PARAM_COUNT ZEND_WRONG_PARAM_COUNT()
530#define ZEND_NUM_ARGS() EX_NUM_ARGS()
531#define ZEND_WRONG_PARAM_COUNT() { zend_wrong_param_count(); return; }
537#define array_init(arg) ZVAL_ARR((arg), zend_new_array(0))
538#define array_init_size(arg, size) ZVAL_ARR((arg), zend_new_array(size))
687#define call_user_function(function_table, object, function_name, retval_ptr, param_count, params) \
688 _call_user_function_impl(object, function_name, retval_ptr, param_count, params, NULL)
690#define call_user_function_named(function_table, object, function_name, retval_ptr, param_count, params, named_params) \
691 _call_user_function_impl(object, function_name, retval_ptr, param_count, params, named_params)
789 zend_fcc_addref(dest);
813 zend_get_gc_buffer_add_obj(gc_buffer, fcc->
object);
816 zend_get_gc_buffer_add_obj(gc_buffer, fcc->
closure);
829 ZEND_ASSERT(
retval &&
"Use zend_call_function() directly if not providing a retval");
840 uint32_t param_count,
zval *params,
HashTable *named_params);
850 zend_string_addref(
func->op_array.function_name);
858 uint32_t param_count,
zval *params)
872 zend_call_known_instance_method(fn,
object,
retval_ptr, 1, param);
883 uint32_t param_count,
zval *params);
903 (
int)
ZSTR_LEN(function_or_method_name),
ZSTR_VAL(function_or_method_name));
904 zend_string_release(function_or_method_name);
933#define CHECK_ZVAL_STRING(str) \
934 ZEND_ASSERT(ZSTR_VAL(str)[ZSTR_LEN(str)] == '\0' && "String is not null-terminated");
936#define CHECK_ZVAL_STRING(z)
945 return known_length !=
strlen(
s);
949#define CHECK_ZVAL_NULL_PATH(p) zend_str_has_nul_byte(Z_STR_P(p))
950#define CHECK_NULL_PATH(p, l) zend_char_has_nul_byte(p, l)
952#define ZVAL_STRINGL(z, s, l) do { \
953 ZVAL_NEW_STR(z, zend_string_init(s, l, 0)); \
956#define ZVAL_STRING(z, s) do { \
957 const char *_s = (s); \
958 ZVAL_STRINGL(z, _s, strlen(_s)); \
961#define ZVAL_EMPTY_STRING(z) do { \
962 ZVAL_INTERNED_STR(z, ZSTR_EMPTY_ALLOC()); \
965#define ZVAL_PSTRINGL(z, s, l) do { \
966 ZVAL_NEW_STR(z, zend_string_init(s, l, 1)); \
969#define ZVAL_PSTRING(z, s) do { \
970 const char *_s = (s); \
971 ZVAL_PSTRINGL(z, _s, strlen(_s)); \
974#define ZVAL_EMPTY_PSTRING(z) do { \
975 ZVAL_PSTRINGL(z, "", 0); \
978#define ZVAL_CHAR(z, c) do { \
980 ZVAL_INTERNED_STR(z, ZSTR_CHAR((zend_uchar) _c)); \
983#define ZVAL_STRINGL_FAST(z, s, l) do { \
984 ZVAL_STR(z, zend_string_init_fast(s, l)); \
987#define ZVAL_STRING_FAST(z, s) do { \
988 const char *_s = (s); \
989 ZVAL_STRINGL_FAST(z, _s, strlen(_s)); \
992#define ZVAL_ZVAL(z, zv, copy, dtor) do { \
995 if (EXPECTED(!Z_ISREF_P(__zv))) { \
996 if (copy && !dtor) { \
997 ZVAL_COPY(__z, __zv); \
999 ZVAL_COPY_VALUE(__z, __zv); \
1002 ZVAL_COPY(__z, Z_REFVAL_P(__zv)); \
1003 if (dtor || !copy) { \
1004 zval_ptr_dtor(__zv); \
1009#define RETVAL_BOOL(b) ZVAL_BOOL(return_value, b)
1010#define RETVAL_NULL() ZVAL_NULL(return_value)
1011#define RETVAL_LONG(l) ZVAL_LONG(return_value, l)
1012#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d)
1013#define RETVAL_STR(s) ZVAL_STR(return_value, s)
1014#define RETVAL_INTERNED_STR(s) ZVAL_INTERNED_STR(return_value, s)
1015#define RETVAL_NEW_STR(s) ZVAL_NEW_STR(return_value, s)
1016#define RETVAL_STR_COPY(s) ZVAL_STR_COPY(return_value, s)
1017#define RETVAL_STRING(s) ZVAL_STRING(return_value, s)
1018#define RETVAL_STRINGL(s, l) ZVAL_STRINGL(return_value, s, l)
1019#define RETVAL_STRING_FAST(s) ZVAL_STRING_FAST(return_value, s)
1020#define RETVAL_STRINGL_FAST(s, l) ZVAL_STRINGL_FAST(return_value, s, l)
1021#define RETVAL_EMPTY_STRING() ZVAL_EMPTY_STRING(return_value)
1022#define RETVAL_CHAR(c) ZVAL_CHAR(return_value, c)
1023#define RETVAL_RES(r) ZVAL_RES(return_value, r)
1024#define RETVAL_ARR(r) ZVAL_ARR(return_value, r)
1025#define RETVAL_EMPTY_ARRAY() ZVAL_EMPTY_ARRAY(return_value)
1026#define RETVAL_OBJ(r) ZVAL_OBJ(return_value, r)
1027#define RETVAL_OBJ_COPY(r) ZVAL_OBJ_COPY(return_value, r)
1028#define RETVAL_COPY(zv) ZVAL_COPY(return_value, zv)
1029#define RETVAL_COPY_VALUE(zv) ZVAL_COPY_VALUE(return_value, zv)
1030#define RETVAL_COPY_DEREF(zv) ZVAL_COPY_DEREF(return_value, zv)
1031#define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor)
1032#define RETVAL_FALSE ZVAL_FALSE(return_value)
1033#define RETVAL_TRUE ZVAL_TRUE(return_value)
1035#define RETURN_BOOL(b) do { RETVAL_BOOL(b); return; } while (0)
1036#define RETURN_NULL() do { RETVAL_NULL(); return;} while (0)
1037#define RETURN_LONG(l) do { RETVAL_LONG(l); return; } while (0)
1038#define RETURN_DOUBLE(d) do { RETVAL_DOUBLE(d); return; } while (0)
1039#define RETURN_STR(s) do { RETVAL_STR(s); return; } while (0)
1040#define RETURN_INTERNED_STR(s) do { RETVAL_INTERNED_STR(s); return; } while (0)
1041#define RETURN_NEW_STR(s) do { RETVAL_NEW_STR(s); return; } while (0)
1042#define RETURN_STR_COPY(s) do { RETVAL_STR_COPY(s); return; } while (0)
1043#define RETURN_STRING(s) do { RETVAL_STRING(s); return; } while (0)
1044#define RETURN_STRINGL(s, l) do { RETVAL_STRINGL(s, l); return; } while (0)
1045#define RETURN_STRING_FAST(s) do { RETVAL_STRING_FAST(s); return; } while (0)
1046#define RETURN_STRINGL_FAST(s, l) do { RETVAL_STRINGL_FAST(s, l); return; } while (0)
1047#define RETURN_EMPTY_STRING() do { RETVAL_EMPTY_STRING(); return; } while (0)
1048#define RETURN_CHAR(c) do { RETVAL_CHAR(c); return; } while (0)
1049#define RETURN_RES(r) do { RETVAL_RES(r); return; } while (0)
1050#define RETURN_ARR(r) do { RETVAL_ARR(r); return; } while (0)
1051#define RETURN_EMPTY_ARRAY() do { RETVAL_EMPTY_ARRAY(); return; } while (0)
1052#define RETURN_OBJ(r) do { RETVAL_OBJ(r); return; } while (0)
1053#define RETURN_OBJ_COPY(r) do { RETVAL_OBJ_COPY(r); return; } while (0)
1054#define RETURN_COPY(zv) do { RETVAL_COPY(zv); return; } while (0)
1055#define RETURN_COPY_VALUE(zv) do { RETVAL_COPY_VALUE(zv); return; } while (0)
1056#define RETURN_COPY_DEREF(zv) do { RETVAL_COPY_DEREF(zv); return; } while (0)
1057#define RETURN_ZVAL(zv, copy, dtor) do { RETVAL_ZVAL(zv, copy, dtor); return; } while (0)
1058#define RETURN_FALSE do { RETVAL_FALSE; return; } while (0)
1059#define RETURN_TRUE do { RETVAL_TRUE; return; } while (0)
1060#define RETURN_THROWS() do { ZEND_ASSERT(EG(exception)); (void) return_value; return; } while (0)
1062#define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties(Z_OBJ_P(p)) : NULL)))
1063#define ZVAL_IS_NULL(z) (Z_TYPE_P(z) == IS_NULL)
1066#define ZEND_MINIT ZEND_MODULE_STARTUP_N
1067#define ZEND_MSHUTDOWN ZEND_MODULE_SHUTDOWN_N
1068#define ZEND_RINIT ZEND_MODULE_ACTIVATE_N
1069#define ZEND_RSHUTDOWN ZEND_MODULE_DEACTIVATE_N
1070#define ZEND_MINFO ZEND_MODULE_INFO_N
1071#define ZEND_GINIT(module) ((void (*)(void*))(ZEND_MODULE_GLOBALS_CTOR_N(module)))
1072#define ZEND_GSHUTDOWN(module) ((void (*)(void*))(ZEND_MODULE_GLOBALS_DTOR_N(module)))
1074#define ZEND_MINIT_FUNCTION ZEND_MODULE_STARTUP_D
1075#define ZEND_MSHUTDOWN_FUNCTION ZEND_MODULE_SHUTDOWN_D
1076#define ZEND_RINIT_FUNCTION ZEND_MODULE_ACTIVATE_D
1077#define ZEND_RSHUTDOWN_FUNCTION ZEND_MODULE_DEACTIVATE_D
1078#define ZEND_MINFO_FUNCTION ZEND_MODULE_INFO_D
1079#define ZEND_GINIT_FUNCTION ZEND_MODULE_GLOBALS_CTOR_D
1080#define ZEND_GSHUTDOWN_FUNCTION ZEND_MODULE_GLOBALS_DTOR_D
1100#define _ZEND_TRY_ASSIGN_NULL(zv, is_ref) do { \
1102 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1103 zend_reference *ref = Z_REF_P(_zv); \
1104 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1105 zend_try_assign_typed_ref_null(ref); \
1110 zval_ptr_dtor(_zv); \
1114#define ZEND_TRY_ASSIGN_NULL(zv) \
1115 _ZEND_TRY_ASSIGN_NULL(zv, 0)
1117#define ZEND_TRY_ASSIGN_REF_NULL(zv) do { \
1118 ZEND_ASSERT(Z_ISREF_P(zv)); \
1119 _ZEND_TRY_ASSIGN_NULL(zv, 1); \
1122#define _ZEND_TRY_ASSIGN_FALSE(zv, is_ref) do { \
1124 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1125 zend_reference *ref = Z_REF_P(_zv); \
1126 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1127 zend_try_assign_typed_ref_bool(ref, 0); \
1132 zval_ptr_dtor(_zv); \
1136#define ZEND_TRY_ASSIGN_FALSE(zv) \
1137 _ZEND_TRY_ASSIGN_FALSE(zv, 0)
1139#define ZEND_TRY_ASSIGN_REF_FALSE(zv) do { \
1140 ZEND_ASSERT(Z_ISREF_P(zv)); \
1141 _ZEND_TRY_ASSIGN_FALSE(zv, 1); \
1144#define _ZEND_TRY_ASSIGN_TRUE(zv, is_ref) do { \
1146 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1147 zend_reference *ref = Z_REF_P(_zv); \
1148 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1149 zend_try_assign_typed_ref_bool(ref, 1); \
1154 zval_ptr_dtor(_zv); \
1158#define ZEND_TRY_ASSIGN_TRUE(zv) \
1159 _ZEND_TRY_ASSIGN_TRUE(zv, 0)
1161#define ZEND_TRY_ASSIGN_REF_TRUE(zv) do { \
1162 ZEND_ASSERT(Z_ISREF_P(zv)); \
1163 _ZEND_TRY_ASSIGN_TRUE(zv, 1); \
1166#define _ZEND_TRY_ASSIGN_BOOL(zv, bval, is_ref) do { \
1168 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1169 zend_reference *ref = Z_REF_P(_zv); \
1170 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1171 zend_try_assign_typed_ref_bool(ref, 1); \
1176 zval_ptr_dtor(_zv); \
1177 ZVAL_BOOL(_zv, bval); \
1180#define ZEND_TRY_ASSIGN_BOOL(zv, bval) \
1181 _ZEND_TRY_ASSIGN_BOOL(zv, bval, 0)
1183#define ZEND_TRY_ASSIGN_REF_BOOL(zv, bval) do { \
1184 ZEND_ASSERT(Z_ISREF_P(zv)); \
1185 _ZEND_TRY_ASSIGN_BOOL(zv, bval, 1); \
1188#define _ZEND_TRY_ASSIGN_LONG(zv, lval, is_ref) do { \
1190 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1191 zend_reference *ref = Z_REF_P(_zv); \
1192 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1193 zend_try_assign_typed_ref_long(ref, lval); \
1198 zval_ptr_dtor(_zv); \
1199 ZVAL_LONG(_zv, lval); \
1202#define ZEND_TRY_ASSIGN_LONG(zv, lval) \
1203 _ZEND_TRY_ASSIGN_LONG(zv, lval, 0)
1205#define ZEND_TRY_ASSIGN_REF_LONG(zv, lval) do { \
1206 ZEND_ASSERT(Z_ISREF_P(zv)); \
1207 _ZEND_TRY_ASSIGN_LONG(zv, lval, 1); \
1210#define _ZEND_TRY_ASSIGN_DOUBLE(zv, dval, is_ref) do { \
1212 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1213 zend_reference *ref = Z_REF_P(_zv); \
1214 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1215 zend_try_assign_typed_ref_double(ref, dval); \
1220 zval_ptr_dtor(_zv); \
1221 ZVAL_DOUBLE(_zv, dval); \
1224#define ZEND_TRY_ASSIGN_DOUBLE(zv, dval) \
1225 _ZEND_TRY_ASSIGN_DOUBLE(zv, dval, 0)
1227#define ZEND_TRY_ASSIGN_REF_DOUBLE(zv, dval) do { \
1228 ZEND_ASSERT(Z_ISREF_P(zv)); \
1229 _ZEND_TRY_ASSIGN_DOUBLE(zv, dval, 1); \
1232#define _ZEND_TRY_ASSIGN_EMPTY_STRING(zv, is_ref) do { \
1234 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1235 zend_reference *ref = Z_REF_P(_zv); \
1236 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1237 zend_try_assign_typed_ref_empty_string(ref); \
1242 zval_ptr_dtor(_zv); \
1243 ZVAL_EMPTY_STRING(_zv); \
1246#define ZEND_TRY_ASSIGN_EMPTY_STRING(zv) \
1247 _ZEND_TRY_ASSIGN_EMPTY_STRING(zv, 0)
1249#define ZEND_TRY_ASSIGN_REF_EMPTY_STRING(zv) do { \
1250 ZEND_ASSERT(Z_ISREF_P(zv)); \
1251 _ZEND_TRY_ASSIGN_EMPTY_STRING(zv, 1); \
1254#define _ZEND_TRY_ASSIGN_STR(zv, str, is_ref) do { \
1256 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1257 zend_reference *ref = Z_REF_P(_zv); \
1258 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1259 zend_try_assign_typed_ref_str(ref, str); \
1264 zval_ptr_dtor(_zv); \
1265 ZVAL_STR(_zv, str); \
1268#define ZEND_TRY_ASSIGN_STR(zv, str) \
1269 _ZEND_TRY_ASSIGN_STR(zv, str, 0)
1271#define ZEND_TRY_ASSIGN_REF_STR(zv, str) do { \
1272 ZEND_ASSERT(Z_ISREF_P(zv)); \
1273 _ZEND_TRY_ASSIGN_STR(zv, str, 1); \
1276#define _ZEND_TRY_ASSIGN_NEW_STR(zv, str, is_str) do { \
1278 if (is_str || UNEXPECTED(Z_ISREF_P(_zv))) { \
1279 zend_reference *ref = Z_REF_P(_zv); \
1280 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1281 zend_try_assign_typed_ref_str(ref, str); \
1286 zval_ptr_dtor(_zv); \
1287 ZVAL_NEW_STR(_zv, str); \
1290#define ZEND_TRY_ASSIGN_NEW_STR(zv, str) \
1291 _ZEND_TRY_ASSIGN_NEW_STR(zv, str, 0)
1293#define ZEND_TRY_ASSIGN_REF_NEW_STR(zv, str) do { \
1294 ZEND_ASSERT(Z_ISREF_P(zv)); \
1295 _ZEND_TRY_ASSIGN_NEW_STR(zv, str, 1); \
1298#define _ZEND_TRY_ASSIGN_STRING(zv, string, is_ref) do { \
1300 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1301 zend_reference *ref = Z_REF_P(_zv); \
1302 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1303 zend_try_assign_typed_ref_string(ref, string); \
1308 zval_ptr_dtor(_zv); \
1309 ZVAL_STRING(_zv, string); \
1312#define ZEND_TRY_ASSIGN_STRING(zv, string) \
1313 _ZEND_TRY_ASSIGN_STRING(zv, string, 0)
1315#define ZEND_TRY_ASSIGN_REF_STRING(zv, string) do { \
1316 ZEND_ASSERT(Z_ISREF_P(zv)); \
1317 _ZEND_TRY_ASSIGN_STRING(zv, string, 1); \
1320#define _ZEND_TRY_ASSIGN_STRINGL(zv, string, len, is_ref) do { \
1322 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1323 zend_reference *ref = Z_REF_P(_zv); \
1324 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1325 zend_try_assign_typed_ref_stringl(ref, string, len); \
1330 zval_ptr_dtor(_zv); \
1331 ZVAL_STRINGL(_zv, string, len); \
1334#define ZEND_TRY_ASSIGN_STRINGL(zv, string, len) \
1335 _ZEND_TRY_ASSIGN_STRINGL(zv, string, len, 0)
1337#define ZEND_TRY_ASSIGN_REF_STRINGL(zv, string, len) do { \
1338 ZEND_ASSERT(Z_ISREF_P(zv)); \
1339 _ZEND_TRY_ASSIGN_STRINGL(zv, string, len, 1); \
1342#define _ZEND_TRY_ASSIGN_ARR(zv, arr, is_ref) do { \
1344 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1345 zend_reference *ref = Z_REF_P(_zv); \
1346 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1347 zend_try_assign_typed_ref_arr(ref, arr); \
1352 zval_ptr_dtor(_zv); \
1353 ZVAL_ARR(_zv, arr); \
1356#define ZEND_TRY_ASSIGN_ARR(zv, arr) \
1357 _ZEND_TRY_ASSIGN_ARR(zv, arr, 0)
1359#define ZEND_TRY_ASSIGN_REF_ARR(zv, arr) do { \
1360 ZEND_ASSERT(Z_ISREF_P(zv)); \
1361 _ZEND_TRY_ASSIGN_ARR(zv, arr, 1); \
1364#define _ZEND_TRY_ASSIGN_RES(zv, res, is_ref) do { \
1366 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1367 zend_reference *ref = Z_REF_P(_zv); \
1368 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1369 zend_try_assign_typed_ref_res(ref, res); \
1374 zval_ptr_dtor(_zv); \
1375 ZVAL_RES(_zv, res); \
1378#define ZEND_TRY_ASSIGN_RES(zv, res) \
1379 _ZEND_TRY_ASSIGN_RES(zv, res, 0)
1381#define ZEND_TRY_ASSIGN_REF_RES(zv, res) do { \
1382 ZEND_ASSERT(Z_ISREF_P(zv)); \
1383 _ZEND_TRY_ASSIGN_RES(zv, res, 1); \
1386#define _ZEND_TRY_ASSIGN_TMP(zv, other_zv, is_ref) do { \
1388 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1389 zend_reference *ref = Z_REF_P(_zv); \
1390 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1391 zend_try_assign_typed_ref(ref, other_zv); \
1396 zval_ptr_dtor(_zv); \
1397 ZVAL_COPY_VALUE(_zv, other_zv); \
1400#define ZEND_TRY_ASSIGN_TMP(zv, other_zv) \
1401 _ZEND_TRY_ASSIGN_TMP(zv, other_zv, 0)
1403#define ZEND_TRY_ASSIGN_REF_TMP(zv, other_zv) do { \
1404 ZEND_ASSERT(Z_ISREF_P(zv)); \
1405 _ZEND_TRY_ASSIGN_TMP(zv, other_zv, 1); \
1408#define _ZEND_TRY_ASSIGN_VALUE(zv, other_zv, is_ref) do { \
1410 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1411 zend_reference *ref = Z_REF_P(_zv); \
1412 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1413 zend_try_assign_typed_ref_zval(ref, other_zv); \
1418 zval_ptr_dtor(_zv); \
1419 ZVAL_COPY_VALUE(_zv, other_zv); \
1422#define ZEND_TRY_ASSIGN_VALUE(zv, other_zv) \
1423 _ZEND_TRY_ASSIGN_VALUE(zv, other_zv, 0)
1425#define ZEND_TRY_ASSIGN_REF_VALUE(zv, other_zv) do { \
1426 ZEND_ASSERT(Z_ISREF_P(zv)); \
1427 _ZEND_TRY_ASSIGN_VALUE(zv, other_zv, 1); \
1430#define ZEND_TRY_ASSIGN_COPY(zv, other_zv) do { \
1431 Z_TRY_ADDREF_P(other_zv); \
1432 ZEND_TRY_ASSIGN_VALUE(zv, other_zv); \
1435#define ZEND_TRY_ASSIGN_REF_COPY(zv, other_zv) do { \
1436 Z_TRY_ADDREF_P(other_zv); \
1437 ZEND_TRY_ASSIGN_REF_VALUE(zv, other_zv); \
1440#define _ZEND_TRY_ASSIGN_VALUE_EX(zv, other_zv, strict, is_ref) do { \
1442 if (is_ref || UNEXPECTED(Z_ISREF_P(_zv))) { \
1443 zend_reference *ref = Z_REF_P(_zv); \
1444 if (UNEXPECTED(ZEND_REF_HAS_TYPE_SOURCES(ref))) { \
1445 zend_try_assign_typed_ref_zval_ex(ref, other_zv, strict); \
1450 zval_ptr_dtor(_zv); \
1451 ZVAL_COPY_VALUE(_zv, other_zv); \
1454#define ZEND_TRY_ASSIGN_VALUE_EX(zv, other_zv, strict) \
1455 _ZEND_TRY_ASSIGN_VALUE_EX(zv, other_zv, strict, 0)
1457#define ZEND_TRY_ASSIGN_REF_VALUE_EX(zv, other_zv, strict) do { \
1458 ZEND_ASSERT(Z_ISREF_P(zv)); \
1459 _ZEND_TRY_ASSIGN_VALUE_EX(zv, other_zv, strict, 1); \
1462#define ZEND_TRY_ASSIGN_COPY_EX(zv, other_zv, strict) do { \
1463 Z_TRY_ADDREF_P(other_zv); \
1464 ZEND_TRY_ASSIGN_VALUE_EX(zv, other_zv, strict); \
1467#define ZEND_TRY_ASSIGN_REF_COPY_EX(zv, other_zv, strict) do { \
1468 Z_TRY_ADDREF_P(other_zv); \
1469 ZEND_TRY_ASSIGN_REF_VALUE_EX(zv, other_zv, strict); \
1498 return zend_try_array_init_size(
zv, 0);
1508#define Z_EXPECTED_TYPES(_) \
1509 _(Z_EXPECTED_LONG, "of type int") \
1510 _(Z_EXPECTED_LONG_OR_NULL, "of type ?int") \
1511 _(Z_EXPECTED_BOOL, "of type bool") \
1512 _(Z_EXPECTED_BOOL_OR_NULL, "of type ?bool") \
1513 _(Z_EXPECTED_STRING, "of type string") \
1514 _(Z_EXPECTED_STRING_OR_NULL, "of type ?string") \
1515 _(Z_EXPECTED_ARRAY, "of type array") \
1516 _(Z_EXPECTED_ARRAY_OR_NULL, "of type ?array") \
1517 _(Z_EXPECTED_ARRAY_OR_LONG, "of type array|int") \
1518 _(Z_EXPECTED_ARRAY_OR_LONG_OR_NULL, "of type array|int|null") \
1519 _(Z_EXPECTED_ITERABLE, "of type Traversable|array") \
1520 _(Z_EXPECTED_ITERABLE_OR_NULL, "of type Traversable|array|null") \
1521 _(Z_EXPECTED_FUNC, "a valid callback") \
1522 _(Z_EXPECTED_FUNC_OR_NULL, "a valid callback or null") \
1523 _(Z_EXPECTED_RESOURCE, "of type resource") \
1524 _(Z_EXPECTED_RESOURCE_OR_NULL, "of type resource or null") \
1525 _(Z_EXPECTED_PATH, "of type string") \
1526 _(Z_EXPECTED_PATH_OR_NULL, "of type ?string") \
1527 _(Z_EXPECTED_OBJECT, "of type object") \
1528 _(Z_EXPECTED_OBJECT_OR_NULL, "of type ?object") \
1529 _(Z_EXPECTED_DOUBLE, "of type float") \
1530 _(Z_EXPECTED_DOUBLE_OR_NULL, "of type ?float") \
1531 _(Z_EXPECTED_NUMBER, "of type int|float") \
1532 _(Z_EXPECTED_NUMBER_OR_NULL, "of type int|float|null") \
1533 _(Z_EXPECTED_NUMBER_OR_STRING, "of type string|int|float") \
1534 _(Z_EXPECTED_NUMBER_OR_STRING_OR_NULL, "of type string|int|float|null") \
1535 _(Z_EXPECTED_ARRAY_OR_STRING, "of type array|string") \
1536 _(Z_EXPECTED_ARRAY_OR_STRING_OR_NULL, "of type array|string|null") \
1537 _(Z_EXPECTED_STRING_OR_LONG, "of type string|int") \
1538 _(Z_EXPECTED_STRING_OR_LONG_OR_NULL, "of type string|int|null") \
1539 _(Z_EXPECTED_OBJECT_OR_CLASS_NAME, "an object or a valid class name") \
1540 _(Z_EXPECTED_OBJECT_OR_CLASS_NAME_OR_NULL, "an object, a valid class name, or null") \
1541 _(Z_EXPECTED_OBJECT_OR_STRING, "of type object|string") \
1542 _(Z_EXPECTED_OBJECT_OR_STRING_OR_NULL, "of type object|string|null") \
1544#define Z_EXPECTED_TYPE
1546#define Z_EXPECTED_TYPE_ENUM(id, str) id,
1547#define Z_EXPECTED_TYPE_STR(id, str) str,
1575#define ZPP_ERROR_OK 0
1576#define ZPP_ERROR_FAILURE 1
1577#define ZPP_ERROR_WRONG_CALLBACK 2
1578#define ZPP_ERROR_WRONG_CLASS 3
1579#define ZPP_ERROR_WRONG_CLASS_OR_NULL 4
1580#define ZPP_ERROR_WRONG_CLASS_OR_STRING 5
1581#define ZPP_ERROR_WRONG_CLASS_OR_STRING_OR_NULL 6
1582#define ZPP_ERROR_WRONG_CLASS_OR_LONG 7
1583#define ZPP_ERROR_WRONG_CLASS_OR_LONG_OR_NULL 8
1584#define ZPP_ERROR_WRONG_ARG 9
1585#define ZPP_ERROR_WRONG_COUNT 10
1586#define ZPP_ERROR_UNEXPECTED_EXTRA_NAMED 11
1587#define ZPP_ERROR_WRONG_CALLBACK_OR_NULL 12
1589#define ZEND_PARSE_PARAMETERS_START_EX(flags, min_num_args, max_num_args) do { \
1590 const int _flags = (flags); \
1591 uint32_t _min_num_args = (min_num_args); \
1592 uint32_t _max_num_args = (uint32_t) (max_num_args); \
1593 uint32_t _num_args = EX_NUM_ARGS(); \
1595 zval *_real_arg, *_arg = NULL; \
1596 zend_expected_type _expected_type = Z_EXPECTED_LONG; \
1597 char *_error = NULL; \
1599 bool _optional = 0; \
1600 int _error_code = ZPP_ERROR_OK; \
1602 ((void)_real_arg); \
1604 ((void)_expected_type); \
1606 ((void)_optional); \
1610 if (UNEXPECTED(_num_args < _min_num_args) || \
1611 UNEXPECTED(_num_args > _max_num_args)) { \
1612 if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
1613 zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \
1615 _error_code = ZPP_ERROR_FAILURE; \
1618 _real_arg = ZEND_CALL_ARG(execute_data, 0);
1620#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args) \
1621 ZEND_PARSE_PARAMETERS_START_EX(0, min_num_args, max_num_args)
1623#define ZEND_PARSE_PARAMETERS_NONE() do { \
1624 if (UNEXPECTED(ZEND_NUM_ARGS() != 0)) { \
1625 zend_wrong_parameters_none_error(); \
1630#define ZEND_PARSE_PARAMETERS_END_EX(failure) \
1631 ZEND_ASSERT(_i == _max_num_args || _max_num_args == (uint32_t) -1); \
1633 if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
1634 if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
1635 zend_wrong_parameter_error(_error_code, _i, _error, _expected_type, _arg); \
1641#define ZEND_PARSE_PARAMETERS_END() \
1642 ZEND_PARSE_PARAMETERS_END_EX(return)
1644#define Z_PARAM_PROLOGUE(deref, separate) \
1646 ZEND_ASSERT(_i <= _min_num_args || _optional==1); \
1647 ZEND_ASSERT(_i > _min_num_args || _optional==0); \
1649 if (UNEXPECTED(_i >_num_args)) break; \
1654 if (EXPECTED(Z_ISREF_P(_arg))) { \
1655 _arg = Z_REFVAL_P(_arg); \
1659 SEPARATE_ZVAL_NOREF(_arg); \
1663#define Z_PARAM_GET_PREV_ZVAL(dest) \
1664 zend_parse_arg_zval_deref(_arg, &dest, 0);
1667#define Z_PARAM_OPTIONAL \
1671#define Z_PARAM_ARRAY_EX2(dest, check_null, deref, separate) \
1672 Z_PARAM_PROLOGUE(deref, separate); \
1673 if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 0))) { \
1674 _expected_type = check_null ? Z_EXPECTED_ARRAY_OR_NULL : Z_EXPECTED_ARRAY; \
1675 _error_code = ZPP_ERROR_WRONG_ARG; \
1679#define Z_PARAM_ARRAY_EX(dest, check_null, separate) \
1680 Z_PARAM_ARRAY_EX2(dest, check_null, separate, separate)
1682#define Z_PARAM_ARRAY(dest) \
1683 Z_PARAM_ARRAY_EX(dest, 0, 0)
1685#define Z_PARAM_ARRAY_OR_NULL(dest) \
1686 Z_PARAM_ARRAY_EX(dest, 1, 0)
1689#define Z_PARAM_ARRAY_OR_OBJECT_EX2(dest, check_null, deref, separate) \
1690 Z_PARAM_PROLOGUE(deref, separate); \
1691 if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 1))) { \
1692 _expected_type = check_null ? Z_EXPECTED_ARRAY_OR_NULL : Z_EXPECTED_ARRAY; \
1693 _error_code = ZPP_ERROR_WRONG_ARG; \
1697#define Z_PARAM_ARRAY_OR_OBJECT_EX(dest, check_null, separate) \
1698 Z_PARAM_ARRAY_OR_OBJECT_EX2(dest, check_null, separate, separate)
1700#define Z_PARAM_ARRAY_OR_OBJECT(dest) \
1701 Z_PARAM_ARRAY_OR_OBJECT_EX(dest, 0, 0)
1703#define Z_PARAM_ITERABLE_EX(dest, check_null) \
1704 Z_PARAM_PROLOGUE(0, 0); \
1705 if (UNEXPECTED(!zend_parse_arg_iterable(_arg, &dest, check_null))) { \
1706 _expected_type = check_null ? Z_EXPECTED_ITERABLE_OR_NULL : Z_EXPECTED_ITERABLE; \
1707 _error_code = ZPP_ERROR_WRONG_ARG; \
1711#define Z_PARAM_ITERABLE(dest) \
1712 Z_PARAM_ITERABLE_EX(dest, 0)
1714#define Z_PARAM_ITERABLE_OR_NULL(dest) \
1715 Z_PARAM_ITERABLE_EX(dest, 1)
1718#define Z_PARAM_BOOL_EX(dest, is_null, check_null, deref) \
1719 Z_PARAM_PROLOGUE(deref, 0); \
1720 if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null, _i))) { \
1721 _expected_type = check_null ? Z_EXPECTED_BOOL_OR_NULL : Z_EXPECTED_BOOL; \
1722 _error_code = ZPP_ERROR_WRONG_ARG; \
1726#define Z_PARAM_BOOL(dest) \
1727 Z_PARAM_BOOL_EX(dest, _dummy, 0, 0)
1729#define Z_PARAM_BOOL_OR_NULL(dest, is_null) \
1730 Z_PARAM_BOOL_EX(dest, is_null, 1, 0)
1733#define Z_PARAM_CLASS_EX(dest, check_null, deref) \
1734 Z_PARAM_PROLOGUE(deref, 0); \
1735 if (UNEXPECTED(!zend_parse_arg_class(_arg, &dest, _i, check_null))) { \
1736 _error_code = ZPP_ERROR_FAILURE; \
1740#define Z_PARAM_CLASS(dest) \
1741 Z_PARAM_CLASS_EX(dest, 0, 0)
1743#define Z_PARAM_CLASS_OR_NULL(dest) \
1744 Z_PARAM_CLASS_EX(dest, 1, 0)
1746#define Z_PARAM_OBJ_OR_CLASS_NAME_EX(dest, allow_null) \
1747 Z_PARAM_PROLOGUE(0, 0); \
1748 if (UNEXPECTED(!zend_parse_arg_obj_or_class_name(_arg, &dest, allow_null))) { \
1749 _expected_type = allow_null ? Z_EXPECTED_OBJECT_OR_CLASS_NAME_OR_NULL : Z_EXPECTED_OBJECT_OR_CLASS_NAME; \
1750 _error_code = ZPP_ERROR_WRONG_ARG; \
1754#define Z_PARAM_OBJ_OR_CLASS_NAME(dest) \
1755 Z_PARAM_OBJ_OR_CLASS_NAME_EX(dest, 0);
1757#define Z_PARAM_OBJ_OR_CLASS_NAME_OR_NULL(dest) \
1758 Z_PARAM_OBJ_OR_CLASS_NAME_EX(dest, 1);
1760#define Z_PARAM_OBJ_OR_STR_EX(destination_object, destination_string, allow_null) \
1761 Z_PARAM_PROLOGUE(0, 0); \
1762 if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, NULL, &destination_string, allow_null, _i))) { \
1763 _expected_type = allow_null ? Z_EXPECTED_OBJECT_OR_STRING_OR_NULL : Z_EXPECTED_OBJECT_OR_STRING; \
1764 _error_code = ZPP_ERROR_WRONG_ARG; \
1768#define Z_PARAM_OBJ_OR_STR(destination_object, destination_string) \
1769 Z_PARAM_OBJ_OR_STR_EX(destination_object, destination_string, 0);
1771#define Z_PARAM_OBJ_OR_STR_OR_NULL(destination_object, destination_string) \
1772 Z_PARAM_OBJ_OR_STR_EX(destination_object, destination_string, 1);
1774#define Z_PARAM_OBJ_OF_CLASS_OR_STR_EX(destination_object, base_ce, destination_string, allow_null) \
1775 Z_PARAM_PROLOGUE(0, 0); \
1776 if (UNEXPECTED(!zend_parse_arg_obj_or_str(_arg, &destination_object, base_ce, &destination_string, allow_null, _i))) { \
1778 _error = ZSTR_VAL((base_ce)->name); \
1779 _error_code = allow_null ? ZPP_ERROR_WRONG_CLASS_OR_STRING_OR_NULL : ZPP_ERROR_WRONG_CLASS_OR_STRING; \
1782 _expected_type = allow_null ? Z_EXPECTED_OBJECT_OR_STRING_OR_NULL : Z_EXPECTED_OBJECT_OR_STRING; \
1783 _error_code = ZPP_ERROR_WRONG_ARG; \
1788#define Z_PARAM_OBJ_OF_CLASS_OR_STR(destination_object, base_ce, destination_string) \
1789 Z_PARAM_OBJ_OF_CLASS_OR_STR_EX(destination_object, base_ce, destination_string, 0);
1791#define Z_PARAM_OBJ_OF_CLASS_OR_STR_OR_NULL(destination_object, base_ce, destination_string) \
1792 Z_PARAM_OBJ_OF_CLASS_OR_STR_EX(destination_object, base_ce, destination_string, 1);
1795#define Z_PARAM_DOUBLE_EX(dest, is_null, check_null, deref) \
1796 Z_PARAM_PROLOGUE(deref, 0); \
1797 if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null, _i))) { \
1798 _expected_type = check_null ? Z_EXPECTED_DOUBLE_OR_NULL : Z_EXPECTED_DOUBLE; \
1799 _error_code = ZPP_ERROR_WRONG_ARG; \
1803#define Z_PARAM_DOUBLE(dest) \
1804 Z_PARAM_DOUBLE_EX(dest, _dummy, 0, 0)
1806#define Z_PARAM_DOUBLE_OR_NULL(dest, is_null) \
1807 Z_PARAM_DOUBLE_EX(dest, is_null, 1, 0)
1810#define Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, check_null, deref, free_trampoline) \
1811 Z_PARAM_PROLOGUE(deref, 0); \
1812 if (UNEXPECTED(!zend_parse_arg_func(_arg, &dest_fci, &dest_fcc, check_null, &_error, free_trampoline))) { \
1814 _expected_type = check_null ? Z_EXPECTED_FUNC_OR_NULL : Z_EXPECTED_FUNC; \
1815 _error_code = ZPP_ERROR_WRONG_ARG; \
1817 _error_code = check_null ? ZPP_ERROR_WRONG_CALLBACK_OR_NULL : ZPP_ERROR_WRONG_CALLBACK; \
1822#define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, deref) Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, check_null, deref, true)
1824#define Z_PARAM_FUNC(dest_fci, dest_fcc) \
1825 Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, 0, 0, true)
1827#define Z_PARAM_FUNC_NO_TRAMPOLINE_FREE(dest_fci, dest_fcc) \
1828 Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, 0, 0, false)
1830#define Z_PARAM_FUNC_OR_NULL(dest_fci, dest_fcc) \
1831 Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, 1, 0, true)
1833#define Z_PARAM_FUNC_NO_TRAMPOLINE_FREE_OR_NULL(dest_fci, dest_fcc) \
1834 Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, 1, 0, false)
1836#define Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(dest_fci, dest_fcc, dest_zp) \
1837 Z_PARAM_FUNC_EX2(dest_fci, dest_fcc, 1, 0, true) \
1838 Z_PARAM_GET_PREV_ZVAL(dest_zp)
1841#define Z_PARAM_ARRAY_HT_EX2(dest, check_null, deref, separate) \
1842 Z_PARAM_PROLOGUE(deref, separate); \
1843 if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 0, separate))) { \
1844 _expected_type = check_null ? Z_EXPECTED_ARRAY_OR_NULL : Z_EXPECTED_ARRAY; \
1845 _error_code = ZPP_ERROR_WRONG_ARG; \
1849#define Z_PARAM_ARRAY_HT_EX(dest, check_null, separate) \
1850 Z_PARAM_ARRAY_HT_EX2(dest, check_null, separate, separate)
1852#define Z_PARAM_ARRAY_HT(dest) \
1853 Z_PARAM_ARRAY_HT_EX(dest, 0, 0)
1855#define Z_PARAM_ARRAY_HT_OR_NULL(dest) \
1856 Z_PARAM_ARRAY_HT_EX(dest, 1, 0)
1858#define Z_PARAM_ARRAY_HT_OR_LONG_EX(dest_ht, dest_long, is_null, allow_null) \
1859 Z_PARAM_PROLOGUE(0, 0); \
1860 if (UNEXPECTED(!zend_parse_arg_array_ht_or_long(_arg, &dest_ht, &dest_long, &is_null, allow_null, _i))) { \
1861 _expected_type = allow_null ? Z_EXPECTED_ARRAY_OR_LONG_OR_NULL : Z_EXPECTED_ARRAY_OR_LONG; \
1862 _error_code = ZPP_ERROR_WRONG_ARG; \
1866#define Z_PARAM_ARRAY_HT_OR_LONG(dest_ht, dest_long) \
1867 Z_PARAM_ARRAY_HT_OR_LONG_EX(dest_ht, dest_long, _dummy, 0)
1869#define Z_PARAM_ARRAY_HT_OR_LONG_OR_NULL(dest_ht, dest_long, is_null) \
1870 Z_PARAM_ARRAY_HT_OR_LONG_EX(dest_ht, dest_long, is_null, 1)
1873#define Z_PARAM_ARRAY_OR_OBJECT_HT_EX2(dest, check_null, deref, separate) \
1874 Z_PARAM_PROLOGUE(deref, separate); \
1875 if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 1, separate))) { \
1876 _expected_type = check_null ? Z_EXPECTED_ARRAY_OR_NULL : Z_EXPECTED_ARRAY; \
1877 _error_code = ZPP_ERROR_WRONG_ARG; \
1881#define Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, check_null, separate) \
1882 Z_PARAM_ARRAY_OR_OBJECT_HT_EX2(dest, check_null, separate, separate)
1884#define Z_PARAM_ARRAY_OR_OBJECT_HT(dest) \
1885 Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, 0, 0)
1888#define Z_PARAM_LONG_EX(dest, is_null, check_null, deref) \
1889 Z_PARAM_PROLOGUE(deref, 0); \
1890 if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, _i))) { \
1891 _expected_type = check_null ? Z_EXPECTED_LONG_OR_NULL : Z_EXPECTED_LONG; \
1892 _error_code = ZPP_ERROR_WRONG_ARG; \
1896#define Z_PARAM_LONG(dest) \
1897 Z_PARAM_LONG_EX(dest, _dummy, 0, 0)
1899#define Z_PARAM_LONG_OR_NULL(dest, is_null) \
1900 Z_PARAM_LONG_EX(dest, is_null, 1, 0)
1903#define Z_PARAM_NUMBER_EX(dest, check_null) \
1904 Z_PARAM_PROLOGUE(0, 0); \
1905 if (UNEXPECTED(!zend_parse_arg_number(_arg, &dest, check_null, _i))) { \
1906 _expected_type = check_null ? Z_EXPECTED_NUMBER_OR_NULL : Z_EXPECTED_NUMBER; \
1907 _error_code = ZPP_ERROR_WRONG_ARG; \
1911#define Z_PARAM_NUMBER_OR_NULL(dest) \
1912 Z_PARAM_NUMBER_EX(dest, 1)
1914#define Z_PARAM_NUMBER(dest) \
1915 Z_PARAM_NUMBER_EX(dest, 0)
1917#define Z_PARAM_NUMBER_OR_STR_EX(dest, check_null) \
1918 Z_PARAM_PROLOGUE(0, 0); \
1919 if (UNEXPECTED(!zend_parse_arg_number_or_str(_arg, &dest, check_null, _i))) { \
1920 _expected_type = check_null ? Z_EXPECTED_NUMBER_OR_STRING_OR_NULL : Z_EXPECTED_NUMBER_OR_STRING; \
1921 _error_code = ZPP_ERROR_WRONG_ARG; \
1925#define Z_PARAM_NUMBER_OR_STR(dest) \
1926 Z_PARAM_NUMBER_OR_STR_EX(dest, false)
1928#define Z_PARAM_NUMBER_OR_STR_OR_NULL(dest) \
1929 Z_PARAM_NUMBER_OR_STR_EX(dest, true)
1932#define Z_PARAM_OBJECT_EX(dest, check_null, deref) \
1933 Z_PARAM_PROLOGUE(deref, 0); \
1934 if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, NULL, check_null))) { \
1935 _expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
1936 _error_code = ZPP_ERROR_WRONG_ARG; \
1940#define Z_PARAM_OBJECT(dest) \
1941 Z_PARAM_OBJECT_EX(dest, 0, 0)
1943#define Z_PARAM_OBJECT_OR_NULL(dest) \
1944 Z_PARAM_OBJECT_EX(dest, 1, 0)
1947#define Z_PARAM_OBJ_EX(dest, check_null, deref) \
1948 Z_PARAM_PROLOGUE(deref, 0); \
1949 if (UNEXPECTED(!zend_parse_arg_obj(_arg, &dest, NULL, check_null))) { \
1950 _expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
1951 _error_code = ZPP_ERROR_WRONG_ARG; \
1955#define Z_PARAM_OBJ(dest) \
1956 Z_PARAM_OBJ_EX(dest, 0, 0)
1958#define Z_PARAM_OBJ_OR_NULL(dest) \
1959 Z_PARAM_OBJ_EX(dest, 1, 0)
1962#define Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, check_null, deref) \
1963 Z_PARAM_PROLOGUE(deref, 0); \
1964 if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, _ce, check_null))) { \
1966 _error = ZSTR_VAL((_ce)->name); \
1967 _error_code = check_null ? ZPP_ERROR_WRONG_CLASS_OR_NULL : ZPP_ERROR_WRONG_CLASS; \
1970 _expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
1971 _error_code = ZPP_ERROR_WRONG_ARG; \
1976#define Z_PARAM_OBJECT_OF_CLASS(dest, _ce) \
1977 Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, 0, 0)
1979#define Z_PARAM_OBJECT_OF_CLASS_OR_NULL(dest, _ce) \
1980 Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, 1, 0)
1983#define Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, check_null, deref) \
1984 Z_PARAM_PROLOGUE(deref, 0); \
1985 if (UNEXPECTED(!zend_parse_arg_obj(_arg, &dest, _ce, check_null))) { \
1987 _error = ZSTR_VAL((_ce)->name); \
1988 _error_code = check_null ? ZPP_ERROR_WRONG_CLASS_OR_NULL : ZPP_ERROR_WRONG_CLASS; \
1991 _expected_type = check_null ? Z_EXPECTED_OBJECT_OR_NULL : Z_EXPECTED_OBJECT; \
1992 _error_code = ZPP_ERROR_WRONG_ARG; \
1997#define Z_PARAM_OBJ_OF_CLASS(dest, _ce) \
1998 Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, 0, 0)
2000#define Z_PARAM_OBJ_OF_CLASS_OR_NULL(dest, _ce) \
2001 Z_PARAM_OBJ_OF_CLASS_EX(dest, _ce, 1, 0)
2003#define Z_PARAM_OBJ_OF_CLASS_OR_LONG_EX(dest_obj, _ce, dest_long, is_null, allow_null) \
2004 Z_PARAM_PROLOGUE(0, 0); \
2005 if (UNEXPECTED(!zend_parse_arg_obj_or_long(_arg, &dest_obj, _ce, &dest_long, &is_null, allow_null, _i))) { \
2006 _error = ZSTR_VAL((_ce)->name); \
2007 _error_code = allow_null ? ZPP_ERROR_WRONG_CLASS_OR_LONG_OR_NULL : ZPP_ERROR_WRONG_CLASS_OR_LONG; \
2011#define Z_PARAM_OBJ_OF_CLASS_OR_LONG(dest_obj, _ce, dest_long) \
2012 Z_PARAM_OBJ_OF_CLASS_OR_LONG_EX(dest_obj, _ce, dest_long, _dummy, 0)
2014#define Z_PARAM_OBJ_OF_CLASS_OR_LONG_OR_NULL(dest_obj, _ce, dest_long, is_null) \
2015 Z_PARAM_OBJ_OF_CLASS_OR_LONG_EX(dest_obj, _ce, dest_long, is_null, 1)
2018#define Z_PARAM_PATH_EX(dest, dest_len, check_null, deref) \
2019 Z_PARAM_PROLOGUE(deref, 0); \
2020 if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null, _i))) { \
2021 _expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
2022 _error_code = ZPP_ERROR_WRONG_ARG; \
2026#define Z_PARAM_PATH(dest, dest_len) \
2027 Z_PARAM_PATH_EX(dest, dest_len, 0, 0)
2029#define Z_PARAM_PATH_OR_NULL(dest, dest_len) \
2030 Z_PARAM_PATH_EX(dest, dest_len, 1, 0)
2033#define Z_PARAM_PATH_STR_EX(dest, check_null, deref) \
2034 Z_PARAM_PROLOGUE(deref, 0); \
2035 if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null, _i))) { \
2036 _expected_type = check_null ? Z_EXPECTED_PATH_OR_NULL : Z_EXPECTED_PATH; \
2037 _error_code = ZPP_ERROR_WRONG_ARG; \
2041#define Z_PARAM_PATH_STR(dest) \
2042 Z_PARAM_PATH_STR_EX(dest, 0, 0)
2044#define Z_PARAM_PATH_STR_OR_NULL(dest) \
2045 Z_PARAM_PATH_STR_EX(dest, 1, 0)
2048#define Z_PARAM_RESOURCE_EX(dest, check_null, deref) \
2049 Z_PARAM_PROLOGUE(deref, 0); \
2050 if (UNEXPECTED(!zend_parse_arg_resource(_arg, &dest, check_null))) { \
2051 _expected_type = check_null ? Z_EXPECTED_RESOURCE_OR_NULL : Z_EXPECTED_RESOURCE; \
2052 _error_code = ZPP_ERROR_WRONG_ARG; \
2056#define Z_PARAM_RESOURCE(dest) \
2057 Z_PARAM_RESOURCE_EX(dest, 0, 0)
2059#define Z_PARAM_RESOURCE_OR_NULL(dest) \
2060 Z_PARAM_RESOURCE_EX(dest, 1, 0)
2063#define Z_PARAM_STRING_EX(dest, dest_len, check_null, deref) \
2064 Z_PARAM_PROLOGUE(deref, 0); \
2065 if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null, _i))) { \
2066 _expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
2067 _error_code = ZPP_ERROR_WRONG_ARG; \
2071#define Z_PARAM_STRING(dest, dest_len) \
2072 Z_PARAM_STRING_EX(dest, dest_len, 0, 0)
2074#define Z_PARAM_STRING_OR_NULL(dest, dest_len) \
2075 Z_PARAM_STRING_EX(dest, dest_len, 1, 0)
2078#define Z_PARAM_STR_EX(dest, check_null, deref) \
2079 Z_PARAM_PROLOGUE(deref, 0); \
2080 if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null, _i))) { \
2081 _expected_type = check_null ? Z_EXPECTED_STRING_OR_NULL : Z_EXPECTED_STRING; \
2082 _error_code = ZPP_ERROR_WRONG_ARG; \
2086#define Z_PARAM_STR(dest) \
2087 Z_PARAM_STR_EX(dest, 0, 0)
2089#define Z_PARAM_STR_OR_NULL(dest) \
2090 Z_PARAM_STR_EX(dest, 1, 0)
2093#define Z_PARAM_ZVAL_EX2(dest, check_null, deref, separate) \
2094 Z_PARAM_PROLOGUE(deref, separate); \
2095 zend_parse_arg_zval_deref(_arg, &dest, check_null);
2097#define Z_PARAM_ZVAL_EX(dest, check_null, separate) \
2098 Z_PARAM_ZVAL_EX2(dest, check_null, separate, separate)
2100#define Z_PARAM_ZVAL(dest) \
2101 Z_PARAM_ZVAL_EX(dest, 0, 0)
2103#define Z_PARAM_ZVAL_OR_NULL(dest) \
2104 Z_PARAM_ZVAL_EX(dest, 1, 0)
2107#define Z_PARAM_VARIADIC_EX(spec, dest, dest_num, post_varargs) do { \
2108 uint32_t _num_varargs = _num_args - _i - (post_varargs); \
2109 if (EXPECTED(_num_varargs > 0)) { \
2110 dest = _real_arg + 1; \
2111 dest_num = _num_varargs; \
2112 _i += _num_varargs; \
2113 _real_arg += _num_varargs; \
2118 if (UNEXPECTED(ZEND_CALL_INFO(execute_data) & ZEND_CALL_HAS_EXTRA_NAMED_PARAMS)) { \
2119 _error_code = ZPP_ERROR_UNEXPECTED_EXTRA_NAMED; \
2124#define Z_PARAM_VARIADIC(spec, dest, dest_num) \
2125 Z_PARAM_VARIADIC_EX(spec, dest, dest_num, 0)
2127#define Z_PARAM_VARIADIC_WITH_NAMED(dest, dest_num, dest_named) do { \
2128 uint32_t _num_varargs = _num_args - _i; \
2129 if (EXPECTED(_num_varargs > 0)) { \
2130 dest = _real_arg + 1; \
2131 dest_num = _num_varargs; \
2136 if (ZEND_CALL_INFO(execute_data) & ZEND_CALL_HAS_EXTRA_NAMED_PARAMS) { \
2137 dest_named = execute_data->extra_named_params; \
2139 dest_named = NULL; \
2143#define Z_PARAM_ARRAY_HT_OR_STR_EX(dest_ht, dest_str, allow_null) \
2144 Z_PARAM_PROLOGUE(0, 0); \
2145 if (UNEXPECTED(!zend_parse_arg_array_ht_or_str(_arg, &dest_ht, &dest_str, allow_null, _i))) { \
2146 _expected_type = allow_null ? Z_EXPECTED_ARRAY_OR_STRING_OR_NULL : Z_EXPECTED_ARRAY_OR_STRING; \
2147 _error_code = ZPP_ERROR_WRONG_ARG; \
2151#define Z_PARAM_ARRAY_HT_OR_STR(dest_ht, dest_str) \
2152 Z_PARAM_ARRAY_HT_OR_STR_EX(dest_ht, dest_str, 0);
2154#define Z_PARAM_ARRAY_HT_OR_STR_OR_NULL(dest_ht, dest_str) \
2155 Z_PARAM_ARRAY_HT_OR_STR_EX(dest_ht, dest_str, 1);
2157#define Z_PARAM_STR_OR_LONG_EX(dest_str, dest_long, is_null, allow_null) \
2158 Z_PARAM_PROLOGUE(0, 0); \
2159 if (UNEXPECTED(!zend_parse_arg_str_or_long(_arg, &dest_str, &dest_long, &is_null, allow_null, _i))) { \
2160 _expected_type = allow_null ? Z_EXPECTED_STRING_OR_LONG_OR_NULL : Z_EXPECTED_STRING_OR_LONG; \
2161 _error_code = ZPP_ERROR_WRONG_ARG; \
2165#define Z_PARAM_STR_OR_LONG(dest_str, dest_long) \
2166 Z_PARAM_STR_OR_LONG_EX(dest_str, dest_long, _dummy, 0);
2168#define Z_PARAM_STR_OR_LONG_OR_NULL(dest_str, dest_long, is_null) \
2169 Z_PARAM_STR_OR_LONG_EX(dest_str, dest_long, is_null, 1);
2302 return zend_parse_arg_str_ex(
arg, dest, check_null,
arg_num,
false);
2309 if (!zend_parse_arg_str(
arg, &str, check_null,
arg_num)) {
2324 if (!zend_parse_arg_str(
arg, dest, check_null,
arg_num) ||
2335 if (!zend_parse_arg_path_str(
arg, &str, check_null,
arg_num)) {
2390 *dest =
zobj->handlers->get_properties(
zobj);
2492 if (free_trampoline) {
2503 *dest = (check_null &&
2559 return *destination !=
NULL;
2563 *destination =
NULL;
2577 *destination_string =
NULL;
2582 *destination_object =
NULL;
2583 return zend_parse_arg_str(
arg, destination_string, allow_null,
arg_num);
copy(string $from, string $to, $context=null)
count(Countable|array $value, int $mode=COUNT_NORMAL)
php_json_error_code error_code
unsigned char key[REFLECTION_KEY_LEN]
HashTable constants_table
HashTable * backed_enum_table
zval * default_properties_table
zval * default_properties_table
HashTable * backed_enum_table
HashTable * constants_table
zend_class_entry * calling_scope
zend_function * function_handler
zend_class_entry * called_scope
const zend_frameless_function_info * frameless_function_infos
const struct _zend_internal_arg_info * arg_info
zend_string * function_name
struct _zend_function::@236135173067030250234125302313220025134003177336 common
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
struct _zend_class_mutable_data zend_class_mutable_data
ZEND_API ZEND_COLD void zend_class_redeclaration_error_ex(int type, zend_string *new_name, zend_class_entry *old_ce)
ZEND_API zend_result zend_copy_parameters_array(uint32_t param_count, zval *argument_array)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_or_null_error(uint32_t num, char *error)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(uint32_t num, zend_expected_type expected_type, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_error(uint32_t num, const char *name, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_or_null_error(uint32_t num, const char *name, zval *arg)
ZEND_API ZEND_COLD void zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format,...)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t num, const char *name, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error(void)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(uint32_t min_num_args, uint32_t max_num_args)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_error(uint32_t num, const char *name, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error_variadic(zend_class_entry *error_ce, uint32_t arg_num, const char *format, va_list va)
ZEND_API ZEND_COLD void zend_argument_must_not_be_empty_error(uint32_t arg_num)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error(int error_code, uint32_t num, char *name, zend_expected_type expected_type, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_unexpected_extra_named_error(void)
ZEND_API ZEND_COLD void zend_class_redeclaration_error(int type, zend_class_entry *old_ce)
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format,...)
ZEND_API ZEND_COLD void zend_argument_type_error(uint32_t arg_num, const char *format,...)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(uint32_t num, const char *name, zval *arg)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_or_null_error(uint32_t num, const char *name, zval *arg)
ZEND_API zend_result zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(uint32_t num, char *error)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, zend_long *dest, uint32_t arg_num)
ZEND_API zend_result zend_update_class_constants(zend_class_entry *class_type)
ZEND_API zend_result add_next_index_null(zval *arg)
ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value)
ZEND_API const zend_fcall_info empty_fcall_info
ZEND_API zval * zend_read_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, bool silent, zval *rv)
#define CHECK_NULL_PATH(p, l)
ZEND_API zend_result add_next_index_bool(zval *arg, bool b)
ZEND_API void add_property_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr)
ZEND_API const zend_fcall_info_cache empty_fcall_info_cache
ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type)
ZEND_API bool zend_is_countable(const zval *countable)
ZEND_API zend_result array_set_zval_key(HashTable *ht, zval *key, zval *value)
struct _zend_fcall_info_cache zend_fcall_info_cache
ZEND_API void add_property_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj)
ZEND_API zend_result zend_try_assign_typed_ref_null(zend_reference *ref)
ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, zend_string *lcname, int error_type)
ZEND_API zend_class_entry * zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce)
ZEND_API ZEND_COLD const char * zend_get_object_type_case(const zend_class_entry *ce, bool upper_case)
ZEND_API const char * zend_zval_value_name(const zval *arg)
ZEND_API void add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, bool b)
ZEND_API zend_module_entry * zend_register_module_ex(zend_module_entry *module, int module_type)
ZEND_API zend_result zend_parse_parameter(int flags, uint32_t arg_num, zval *arg, const char *spec,...)
ZEND_API zend_result zend_try_assign_typed_ref_double(zend_reference *ref, double dval)
ZEND_API const char * zend_get_type_by_const(int type)
ZEND_API zend_result add_next_index_object(zval *arg, zend_object *obj)
ZEND_API void zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type)
ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properties)
ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce, bool persistent)
ZEND_API zend_result zend_startup_module(zend_module_entry *module_entry)
ZEND_API void add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l)
ZEND_API void zend_fcall_info_argv(zend_fcall_info *fci, uint32_t argc, va_list *argv)
ZEND_API HashTable * zend_separate_class_constants_table(zend_class_entry *class_type)
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *ce)
ZEND_API zend_result zend_try_assign_typed_ref_ex(zend_reference *ref, zval *zv, bool strict)
ZEND_API void zend_call_known_instance_method_with_2_params(zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2)
ZEND_API void zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type)
ZEND_API zend_result add_next_index_stringl(zval *arg, const char *str, size_t length)
ZEND_API zval * zend_read_static_property_ex(zend_class_entry *scope, zend_string *name, bool silent)
ZEND_API zend_property_info * zend_declare_typed_property(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment, zend_type type)
ZEND_API ZEND_COLD void zend_wrong_param_count(void)
ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value)
ZEND_API zend_class_entry * zend_register_internal_class(zend_class_entry *class_entry)
ZEND_API zend_result add_next_index_double(zval *arg, double d)
ZEND_API void add_index_array(zval *arg, zend_ulong index, zend_array *arr)
ZEND_API zend_result add_next_index_long(zval *arg, zend_long n)
ZEND_API zend_result zend_get_default_from_internal_arg_info(zval *default_value_zval, zend_internal_arg_info *arg_info)
struct _zend_function_entry zend_function_entry
ZEND_API const char * zend_zval_type_name(const zval *arg)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, bool check_null)
ZEND_API void zend_collect_module_handlers(void)
ZEND_API zend_result zend_disable_class(const char *class_name, size_t class_name_length)
ZEND_API zend_result zend_get_module_started(const char *module_name)
ZEND_API zend_result object_init_with_constructor(zval *arg, zend_class_entry *class_type, uint32_t param_count, zval *params, HashTable *named_params)
ZEND_API zend_result zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error)
ZEND_API zval * zend_read_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, bool silent, zval *rv)
ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length)
ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d)
ZEND_API ZEND_COLD void zend_wrong_property_read(zval *object, zval *property)
ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length)
ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str)
ZEND_API zend_result zend_try_assign_typed_ref_long(zend_reference *ref, zend_long lval)
ZEND_API void add_assoc_array_ex(zval *arg, const char *key, size_t key_len, zend_array *arr)
ZEND_API void zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type)
ZEND_API zend_result zend_call_method_if_exists(zend_object *object, zend_string *method_name, zval *retval, uint32_t param_count, zval *params)
ZEND_API zend_result zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args)
ZEND_API bool zend_is_callable_at_frame(zval *callable, zend_object *object, zend_execute_data *frame, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error)
ZEND_API void zend_update_property_double(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, double value)
ZEND_API void add_assoc_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref)
ZEND_API void zend_get_callable_zval_from_fcc(const zend_fcall_info_cache *fcc, zval *callable)
ZEND_API void zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type)
ZEND_API zend_result zend_update_static_property_bool(zend_class_entry *scope, const char *name, size_t name_length, zend_long value)
ZEND_API zend_class_entry * zend_register_internal_interface(zend_class_entry *orig_class_entry)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_slow(const zval *arg, zend_long *dest, uint32_t arg_num)
ZEND_API zend_result object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties)
ZEND_API void zend_detach_symbol_table(zend_execute_data *execute_data)
ZEND_API void zend_unset_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length)
ZEND_API void zend_update_property_string(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, const char *value)
ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, const char *value, size_t value_length)
ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str)
ZEND_API bool ZEND_FASTCALL zend_flf_parse_arg_bool_slow(const zval *arg, bool *dest, uint32_t arg_num)
ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str)
ZEND_API void add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r)
#define Z_EXPECTED_TYPES(_)
ZEND_API void zend_update_property_bool(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_long value)
ZEND_API void zend_startup_modules(void)
ZEND_API zend_result zend_try_assign_typed_ref(zend_reference *ref, zval *zv)
ZEND_API void add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b)
enum _zend_expected_type zend_expected_type
ZEND_API void zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment)
ZEND_API zend_class_constant * zend_declare_typed_class_constant(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment, zend_type type)
ZEND_API void add_index_object(zval *arg, zend_ulong index, zend_object *obj)
ZEND_API zend_result add_next_index_reference(zval *arg, zend_reference *ref)
ZEND_API zend_result zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, bool is_ref, int num_symbol_tables,...)
ZEND_API void add_index_resource(zval *arg, zend_ulong index, zend_resource *r)
ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str)
ZEND_API zend_result zend_startup_module_ex(zend_module_entry *module)
ZEND_API void add_index_double(zval *arg, zend_ulong index, double d)
ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value)
ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name)
ZEND_API zend_result zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length)
ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, bool free_mem)
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value)
ZEND_API void add_index_bool(zval *arg, zend_ulong index, bool b)
ZEND_API zend_string * zend_get_callable_name_ex(zval *callable, zend_object *object)
ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, uint32_t param_count, zval *params)
ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length)
ZEND_API void add_assoc_object_ex(zval *arg, const char *key, size_t key_len, zend_object *obj)
ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table)
ZEND_API zend_result zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value)
struct _zend_fcall_info zend_fcall_info
ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str)
ZEND_API void zend_fcall_info_argn(zend_fcall_info *fci, uint32_t argc,...)
ZEND_API void zend_update_property(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zval *value)
ZEND_API zend_module_entry * zend_register_internal_module(zend_module_entry *module_entry)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_slow(const zval *arg, double *dest, uint32_t arg_num)
ZEND_API zend_result zend_try_assign_typed_ref_zval(zend_reference *ref, zval *zv)
ZEND_API zend_result zend_try_assign_typed_ref_string(zend_reference *ref, const char *string)
ZEND_API zend_class_entry * zend_register_internal_class_with_flags(zend_class_entry *class_entry, zend_class_entry *parent_ce, uint32_t flags)
ZEND_API zend_class_constant * zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment)
ZEND_API void add_index_reference(zval *arg, zend_ulong index, zend_reference *ref)
ZEND_API void zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type)
ZEND_API zend_string * zend_get_callable_name(zval *callable)
ZEND_API zend_result zend_try_assign_typed_ref_str(zend_reference *ref, zend_string *str)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_or_str_slow(zval *arg, zval **dest, uint32_t arg_num)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_weak(const zval *arg, bool *dest, uint32_t arg_num)
ZEND_API void zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type)
ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error)
ZEND_API void zend_attach_symbol_table(zend_execute_data *execute_data)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_bool_slow(const zval *arg, bool *dest, uint32_t arg_num)
ZEND_API void zend_update_property_long(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_long value)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(const zval *arg, double *dest, uint32_t arg_num)
ZEND_API zend_result add_next_index_resource(zval *arg, zend_resource *r)
ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n)
ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value)
ZEND_API const char * zend_get_module_version(const char *module_name)
ZEND_API zend_result zend_try_assign_typed_ref_bool(zend_reference *ref, bool val)
#define ZEND_FCC_INITIALIZED(fcc)
ZEND_API zend_result zend_set_local_var(zend_string *name, zval *value, bool force)
ZEND_API void add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r)
ZEND_API zend_result zend_fcall_info_args(zend_fcall_info *fci, zval *args)
ZEND_API zend_result zend_update_static_property_long(zend_class_entry *scope, const char *name, size_t name_length, zend_long value)
ZEND_API zend_result zend_try_assign_typed_ref_arr(zend_reference *ref, zend_array *arr)
ZEND_API zend_result zend_parse_method_parameters(uint32_t num_args, zval *this_ptr, const char *type_spec,...)
#define Z_EXPECTED_TYPE_ENUM(id, str)
ZEND_API zend_result zend_try_assign_typed_ref_res(zend_reference *ref, zend_resource *res)
ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str)
ZEND_API void zend_add_magic_method(zend_class_entry *ce, zend_function *fptr, zend_string *lcname)
ZEND_API zval * zend_read_static_property(zend_class_entry *scope, const char *name, size_t name_length, bool silent)
ZEND_API void zend_release_fcall_info_cache(zend_fcall_info_cache *fcc)
ZEND_API void add_property_reference_ex(zval *arg, const char *key, size_t key_len, zend_reference *ref)
ZEND_API zend_result zend_parse_method_parameters_ex(int flags, uint32_t num_args, zval *this_ptr, const char *type_spec,...)
ZEND_API zend_result _call_user_function_impl(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], HashTable *named_params)
ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len, double d)
ZEND_API int zend_next_free_module(void)
ZEND_API zend_string * zend_zval_get_legacy_type(const zval *arg)
ZEND_API void zend_disable_functions(const char *function_list)
ZEND_API zend_result zend_try_assign_typed_ref_empty_string(zend_reference *ref)
ZEND_API zend_result add_next_index_array(zval *arg, zend_array *arr)
ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv)
ZEND_API zend_result zend_try_assign_typed_ref_stringl(zend_reference *ref, const char *string, size_t len)
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties)
ZEND_API void zend_update_property_null(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length)
ZEND_API void zend_update_property_ex(zend_class_entry *scope, zend_object *object, zend_string *name, zval *value)
ZEND_API zend_result zend_delete_global_variable(zend_string *name)
ZEND_API zend_result zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length)
ZEND_API zend_result zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, bool strict)
ZEND_API zend_array * zend_rebuild_symbol_table(void)
ZEND_API void zend_call_known_function(zend_function *fn, zend_object *object, zend_class_entry *called_scope, zval *retval_ptr, uint32_t param_count, zval *params, HashTable *named_params)
ZEND_API zend_result zend_update_class_constant(zend_class_constant *c, const zend_string *name, zend_class_entry *scope)
ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value)
ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, bool value)
ZEND_API zend_result add_next_index_string(zval *arg, const char *str)
ZEND_API zend_result zend_set_local_var_str(const char *name, size_t len, zval *value, bool force)
ZEND_API zend_result zend_update_static_property_double(zend_class_entry *scope, const char *name, size_t name_length, double value)
ZEND_API void zend_update_property_str(zend_class_entry *scope, zend_object *object, const char *name, size_t name_length, zend_string *value)
ZEND_API void add_index_null(zval *arg, zend_ulong index)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_or_long_slow(zval *arg, zend_string **dest_str, zend_long *dest_long, uint32_t arg_num)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_str_weak(zval *arg, zend_string **dest, uint32_t arg_num)
ZEND_API zend_result zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval, zval *args)
ZEND_API void add_assoc_null_ex(zval *arg, const char *key, size_t key_len)
ZEND_API zend_result zend_update_static_property_ex(zend_class_entry *scope, zend_string *name, zval *value)
ZEND_API void object_init(zval *arg)
ZEND_API bool ZEND_FASTCALL zend_flf_parse_arg_str_slow(zval *arg, zend_string **dest, uint32_t arg_num)
ZEND_API void zend_class_implements(zend_class_entry *class_entry, int num_interfaces,...)
ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length)
ZEND_API zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache)
ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n)
ZEND_API bool zend_is_iterable(const zval *iterable)
ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
ZEND_API void add_property_null_ex(zval *arg, const char *key, size_t key_len)
ZEND_API void zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type)
ZEND_API void zend_destroy_modules(void)
ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name)
ZEND_API bool ZEND_FASTCALL zend_flf_parse_arg_long_slow(const zval *arg, zend_long *dest, uint32_t arg_num)
ZEND_API zend_result add_next_index_str(zval *arg, zend_string *str)
ZEND_API bool ZEND_FASTCALL zend_parse_arg_number_slow(zval *arg, zval **dest, uint32_t arg_num)
ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, uint32_t *param_count, zval **params)
ZEND_API zend_result zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value)
ZEND_API zend_result zend_parse_parameters_ex(int flags, uint32_t num_args, const char *type_spec,...)
#define ZEND_ACC_CALL_VIA_TRAMPOLINE
#define ZEND_ACC_HAS_AST_CONSTANTS
struct _zend_class_constant zend_class_constant
struct _zend_property_info zend_property_info
#define ZEND_ACC_HAS_AST_PROPERTIES
struct _zend_internal_arg_info zend_internal_arg_info
#define ZEND_CALL_INFO(call)
#define ZEND_CALL_DYNAMIC
void(ZEND_FASTCALL * zif_handler)(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_REF_HAS_TYPE_SOURCES(ref)
ZEND_API zend_class_entry * zend_lookup_class(zend_string *name)
ZEND_API zend_string * get_active_function_or_method_name(void)
union _zend_function zend_function
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_update(HashTable *ht, zend_ulong h, zval *pData)
ZEND_API HashTable *ZEND_FASTCALL zend_array_dup(HashTable *source)
#define zend_new_array(size)
struct _zend_string zend_string
#define ZEND_MAP_PTR_GET_IMM(ptr)
#define ZEND_MAP_PTR(ptr)
struct _zend_module_entry zend_module_entry
#define EXPECTED(condition)
#define zend_always_inline
#define UNEXPECTED(condition)
struct _zend_array zend_array
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_ISREF_P(zval_p)
#define Z_REFVAL_P(zval_p)
#define Z_ARRVAL_P(zval_p)
struct _zend_resource zend_resource
struct _zend_array HashTable
#define Z_OBJCE_P(zval_p)
ZEND_RESULT_CODE zend_result
#define IS_ARRAY_IMMUTABLE
struct _zend_execute_data zend_execute_data
#define ZVAL_COPY_VALUE(z, v)
struct _zend_reference zend_reference
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
zend_refcounted * garbage