Back to index

php5  5.3.10
Classes | Defines | Typedefs | Functions | Variables
zend_API.h File Reference
#include "zend_modules.h"
#include "zend_list.h"
#include "zend_operators.h"
#include "zend_variables.h"
#include "zend_execute.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _zend_function_entry
struct  _zend_fcall_info
struct  _zend_fcall_info_cache

Defines

#define ZEND_NS_NAME(ns, name)   ns"\\"name
#define ZEND_FN(name)   zif_##name
#define ZEND_MN(name)   zim_##name
#define ZEND_NAMED_FUNCTION(name)   void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FUNCTION(name)   ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_METHOD(classname, name)   ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name))
#define ZEND_FENTRY(zend_name, name, arg_info, flags)   { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags)   { zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
#define ZEND_RAW_NAMED_FE(zend_name, name, arg_info)   ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0)
#define ZEND_NAMED_FE(zend_name, name, arg_info)   ZEND_FENTRY(zend_name, name, arg_info, 0)
#define ZEND_FE(name, arg_info)   ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
#define ZEND_DEP_FE(name, arg_info)   ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_FALIAS(name, alias, arg_info)   ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0)
#define ZEND_DEP_FALIAS(name, alias, arg_info)   ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_NAMED_ME(zend_name, name, arg_info, flags)   ZEND_FENTRY(zend_name, name, arg_info, flags)
#define ZEND_ME(classname, name, arg_info, flags)   ZEND_FENTRY(name, ZEND_MN(classname##_##name), arg_info, flags)
#define ZEND_ABSTRACT_ME(classname, name, arg_info)   ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
#define ZEND_MALIAS(classname, name, alias, arg_info, flags)   ZEND_FENTRY(name, ZEND_MN(classname##_##alias), arg_info, flags)
#define ZEND_ME_MAPPING(name, func_name, arg_types, flags)   ZEND_NAMED_ME(name, ZEND_FN(func_name), arg_types, flags)
#define ZEND_NS_FENTRY(ns, zend_name, name, arg_info, flags)   ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags)
#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)
#define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info)   ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info)   ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
#define ZEND_NS_FE(ns, name, arg_info)   ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
#define ZEND_NS_DEP_FE(ns, name, arg_info)   ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_NS_FALIAS(ns, name, alias, arg_info)   ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)
#define ZEND_NS_DEP_FALIAS(ns, name, alias, arg_info)   ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)
#define ZEND_FE_END   { NULL, NULL, NULL, 0, 0 }
#define ZEND_ARG_INFO(pass_by_ref, name)   { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
#define ZEND_ARG_PASS_INFO(pass_by_ref)   { NULL, 0, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null)   { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 },
#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null)   { #name, sizeof(#name)-1, NULL, 0, 1, allow_null, pass_by_ref, 0, 0 },
#define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args)
#define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference)   ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1)
#define ZEND_END_ARG_INFO()   };
#define ZEND_MODULE_STARTUP_N(module)   zm_startup_##module
#define ZEND_MODULE_SHUTDOWN_N(module)   zm_shutdown_##module
#define ZEND_MODULE_ACTIVATE_N(module)   zm_activate_##module
#define ZEND_MODULE_DEACTIVATE_N(module)   zm_deactivate_##module
#define ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module)   zm_post_zend_deactivate_##module
#define ZEND_MODULE_INFO_N(module)   zm_info_##module
#define ZEND_MODULE_GLOBALS_CTOR_N(module)   zm_globals_ctor_##module
#define ZEND_MODULE_GLOBALS_DTOR_N(module)   zm_globals_dtor_##module
#define ZEND_MODULE_STARTUP_D(module)   int ZEND_MODULE_STARTUP_N(module)(INIT_FUNC_ARGS)
#define ZEND_MODULE_SHUTDOWN_D(module)   int ZEND_MODULE_SHUTDOWN_N(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MODULE_ACTIVATE_D(module)   int ZEND_MODULE_ACTIVATE_N(module)(INIT_FUNC_ARGS)
#define ZEND_MODULE_DEACTIVATE_D(module)   int ZEND_MODULE_DEACTIVATE_N(module)(SHUTDOWN_FUNC_ARGS)
#define ZEND_MODULE_POST_ZEND_DEACTIVATE_D(module)   int ZEND_MODULE_POST_ZEND_DEACTIVATE_N(module)(void)
#define ZEND_MODULE_INFO_D(module)   void ZEND_MODULE_INFO_N(module)(ZEND_MODULE_INFO_FUNC_ARGS)
#define ZEND_MODULE_GLOBALS_CTOR_D(module)   void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC)
#define ZEND_MODULE_GLOBALS_DTOR_D(module)   void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC)
#define ZEND_GET_MODULE(name)
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)   typedef struct _zend_##module_name##_globals {
#define ZEND_END_MODULE_GLOBALS(module_name)   } zend_##module_name##_globals;
#define ZEND_DECLARE_MODULE_GLOBALS(module_name)   zend_##module_name##_globals module_name##_globals;
#define ZEND_EXTERN_MODULE_GLOBALS(module_name)   extern zend_##module_name##_globals module_name##_globals;
#define ZEND_INIT_MODULE_GLOBALS(module_name, globals_ctor, globals_dtor)   globals_ctor(&module_name##_globals);
#define INIT_CLASS_ENTRY(class_container, class_name, functions)   INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)
#define INIT_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions)   INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, NULL, NULL, NULL, NULL, NULL)
#define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset)
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset)   INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL)
#define INIT_NS_CLASS_ENTRY(class_container, ns, class_name, functions)   INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions)
#define INIT_OVERLOADED_NS_CLASS_ENTRY_EX(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset)   INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, ZEND_NS_NAME(ns, class_name), sizeof(ZEND_NS_NAME(ns, class_name))-1, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset)
#define INIT_OVERLOADED_NS_CLASS_ENTRY(class_container, ns, class_name, functions, handle_fcall, handle_propget, handle_propset)   INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset)
#define CE_STATIC_MEMBERS(ce)   ((ce)->static_members)
#define ZEND_FCI_INITIALIZED(fci)   ((fci).size != 0)
#define zend_get_parameters_array(ht, param_count, argument_array)   _zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC)
#define zend_get_parameters_array_ex(param_count, argument_array)   _zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC)
#define zend_parse_parameters_none()   zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "")
#define ZEND_PARSE_PARAMS_QUIET   1<<1
#define zend_register_class_alias(name, ce)   zend_register_class_alias_ex(name, sizeof(name)-1, ce TSRMLS_DC)
#define zend_register_ns_class_alias(ns, name, ce)   zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce TSRMLS_DC)
#define IS_CALLABLE_CHECK_SYNTAX_ONLY   (1<<0)
#define IS_CALLABLE_CHECK_NO_ACCESS   (1<<1)
#define IS_CALLABLE_CHECK_IS_STATIC   (1<<2)
#define IS_CALLABLE_CHECK_SILENT   (1<<3)
#define IS_CALLABLE_STRICT   (IS_CALLABLE_CHECK_IS_STATIC)
#define getThis()   (this_ptr)
#define WRONG_PARAM_COUNT   ZEND_WRONG_PARAM_COUNT()
#define WRONG_PARAM_COUNT_WITH_RETVAL(ret)   ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)
#define ARG_COUNT(dummy)   (ht)
#define ZEND_NUM_ARGS()   (ht)
#define ZEND_WRONG_PARAM_COUNT()   { zend_wrong_param_count(TSRMLS_C); return; }
#define ZEND_WRONG_PARAM_COUNT_WITH_RETVAL(ret)   { zend_wrong_param_count(TSRMLS_C); return ret; }
#define DLEXPORT
#define array_init(arg)   _array_init((arg), 0 ZEND_FILE_LINE_CC)
#define array_init_size(arg, size)   _array_init((arg), (size) ZEND_FILE_LINE_CC)
#define object_init(arg)   _object_init((arg) ZEND_FILE_LINE_CC TSRMLS_CC)
#define object_init_ex(arg, ce)   _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC TSRMLS_CC)
#define object_and_properties_init(arg, ce, properties)   _object_and_properties_init((arg), (ce), (properties) ZEND_FILE_LINE_CC TSRMLS_CC)
#define add_assoc_long(__arg, __key, __n)   add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
#define add_assoc_null(__arg, __key)   add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_assoc_bool(__arg, __key, __b)   add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_assoc_resource(__arg, __key, __r)   add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_assoc_double(__arg, __key, __d)   add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
#define add_assoc_string(__arg, __key, __str, __duplicate)   add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate)   add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_assoc_zval(__arg, __key, __value)   add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
#define add_assoc_unset(__arg, __key)   add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_index_unset(__arg, __key)   add_index_null(__arg, __key)
#define add_next_index_unset(__arg)   add_next_index_null(__arg)
#define add_property_unset(__arg, __key)   add_property_null(__arg, __key)
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate)   add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate)   add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
#define add_property_long(__arg, __key, __n)   add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC)
#define add_property_null(__arg, __key)   add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC)
#define add_property_bool(__arg, __key, __b)   add_property_bool_ex(__arg, __key, strlen(__key)+1, __b TSRMLS_CC)
#define add_property_resource(__arg, __key, __r)   add_property_resource_ex(__arg, __key, strlen(__key)+1, __r TSRMLS_CC)
#define add_property_double(__arg, __key, __d)   add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC)
#define add_property_string(__arg, __key, __str, __duplicate)   add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC)
#define add_property_stringl(__arg, __key, __str, __length, __duplicate)   add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC)
#define add_property_zval(__arg, __key, __value)   add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC)
#define add_method(arg, key, method)   add_assoc_function((arg), (key), (method))
#define CHECK_ZVAL_STRING(z)
#define CHECK_ZVAL_STRING_REL(z)
#define ZVAL_RESOURCE(z, l)
#define ZVAL_BOOL(z, b)
#define ZVAL_NULL(z)
#define ZVAL_LONG(z, l)
#define ZVAL_DOUBLE(z, d)
#define ZVAL_STRING(z, s, duplicate)
#define ZVAL_STRINGL(z, s, l, duplicate)
#define ZVAL_EMPTY_STRING(z)
#define ZVAL_ZVAL(z, zv, copy, dtor)
#define ZVAL_FALSE(z)   ZVAL_BOOL(z, 0)
#define ZVAL_TRUE(z)   ZVAL_BOOL(z, 1)
#define RETVAL_RESOURCE(l)   ZVAL_RESOURCE(return_value, l)
#define RETVAL_BOOL(b)   ZVAL_BOOL(return_value, b)
#define RETVAL_NULL()   ZVAL_NULL(return_value)
#define RETVAL_LONG(l)   ZVAL_LONG(return_value, l)
#define RETVAL_DOUBLE(d)   ZVAL_DOUBLE(return_value, d)
#define RETVAL_STRING(s, duplicate)   ZVAL_STRING(return_value, s, duplicate)
#define RETVAL_STRINGL(s, l, duplicate)   ZVAL_STRINGL(return_value, s, l, duplicate)
#define RETVAL_EMPTY_STRING()   ZVAL_EMPTY_STRING(return_value)
#define RETVAL_ZVAL(zv, copy, dtor)   ZVAL_ZVAL(return_value, zv, copy, dtor)
#define RETVAL_FALSE   ZVAL_BOOL(return_value, 0)
#define RETVAL_TRUE   ZVAL_BOOL(return_value, 1)
#define RETURN_RESOURCE(l)   { RETVAL_RESOURCE(l); return; }
#define RETURN_BOOL(b)   { RETVAL_BOOL(b); return; }
#define RETURN_NULL()   { RETVAL_NULL(); return;}
#define RETURN_LONG(l)   { RETVAL_LONG(l); return; }
#define RETURN_DOUBLE(d)   { RETVAL_DOUBLE(d); return; }
#define RETURN_STRING(s, duplicate)   { RETVAL_STRING(s, duplicate); return; }
#define RETURN_STRINGL(s, l, duplicate)   { RETVAL_STRINGL(s, l, duplicate); return; }
#define RETURN_EMPTY_STRING()   { RETVAL_EMPTY_STRING(); return; }
#define RETURN_ZVAL(zv, copy, dtor)   { RETVAL_ZVAL(zv, copy, dtor); return; }
#define RETURN_FALSE   { RETVAL_FALSE; return; }
#define RETURN_TRUE   { RETVAL_TRUE; return; }
#define SET_VAR_STRING(n, v)
#define SET_VAR_STRINGL(n, v, l)
#define SET_VAR_LONG(n, v)
#define SET_VAR_DOUBLE(n, v)
#define ZEND_SET_SYMBOL(symtable, name, var)
#define ZEND_SET_SYMBOL_WITH_LENGTH(symtable, name, name_length, var, _refcount, _is_ref)
#define ZEND_SET_GLOBAL_VAR(name, var)   ZEND_SET_SYMBOL(&EG(symbol_table), name, var)
#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH(name, name_length, var, _refcount, _is_ref)   ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)
#define ZEND_DEFINE_PROPERTY(class_ptr, name, value, mask)
#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((p) TSRMLS_CC) : NULL)))
#define ZVAL_IS_NULL(z)   (Z_TYPE_P(z)==IS_NULL)
#define ZEND_MINIT   ZEND_MODULE_STARTUP_N
#define ZEND_MSHUTDOWN   ZEND_MODULE_SHUTDOWN_N
#define ZEND_RINIT   ZEND_MODULE_ACTIVATE_N
#define ZEND_RSHUTDOWN   ZEND_MODULE_DEACTIVATE_N
#define ZEND_MINFO   ZEND_MODULE_INFO_N
#define ZEND_GINIT(module)   ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_CTOR_N(module)))
#define ZEND_GSHUTDOWN(module)   ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_DTOR_N(module)))
#define ZEND_MINIT_FUNCTION   ZEND_MODULE_STARTUP_D
#define ZEND_MSHUTDOWN_FUNCTION   ZEND_MODULE_SHUTDOWN_D
#define ZEND_RINIT_FUNCTION   ZEND_MODULE_ACTIVATE_D
#define ZEND_RSHUTDOWN_FUNCTION   ZEND_MODULE_DEACTIVATE_D
#define ZEND_MINFO_FUNCTION   ZEND_MODULE_INFO_D
#define ZEND_GINIT_FUNCTION   ZEND_MODULE_GLOBALS_CTOR_D
#define ZEND_GSHUTDOWN_FUNCTION   ZEND_MODULE_GLOBALS_DTOR_D

Typedefs

typedef struct _zend_function_entry zend_function_entry
typedef struct _zend_fcall_info zend_fcall_info
typedef struct
_zend_fcall_info_cache 
zend_fcall_info_cache

Functions

int zend_next_free_module (void)
ZEND_API int zend_get_parameters (int ht, int param_count,...)
ZEND_API int _zend_get_parameters_array (int ht, int param_count, zval **argument_array TSRMLS_DC)
ZEND_API
ZEND_ATTRIBUTE_DEPRECATED int 
zend_get_parameters_ex (int param_count,...)
ZEND_API int _zend_get_parameters_array_ex (int param_count, zval ***argument_array TSRMLS_DC)
ZEND_API int zend_copy_parameters_array (int param_count, zval *argument_array TSRMLS_DC)
ZEND_API int zend_parse_parameters (int num_args TSRMLS_DC, char *type_spec,...)
ZEND_API int zend_parse_parameters_ex (int flags, int num_args TSRMLS_DC, char *type_spec,...)
ZEND_API char * zend_zval_type_name (const zval *arg)
ZEND_API int zend_parse_method_parameters (int num_args TSRMLS_DC, zval *this_ptr, char *type_spec,...)
ZEND_API int zend_parse_method_parameters_ex (int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec,...)
ZEND_API int zend_register_functions (zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC)
ZEND_API void zend_unregister_functions (const zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC)
ZEND_API int zend_startup_module (zend_module_entry *module_entry)
ZEND_API zend_module_entry * zend_register_internal_module (zend_module_entry *module_entry TSRMLS_DC)
ZEND_API zend_module_entry * zend_register_module_ex (zend_module_entry *module TSRMLS_DC)
ZEND_API int zend_startup_module_ex (zend_module_entry *module TSRMLS_DC)
ZEND_API int zend_startup_modules (TSRMLS_D)
ZEND_API void zend_check_magic_method_implementation (const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC)
ZEND_API zend_class_entry * zend_register_internal_class (zend_class_entry *class_entry TSRMLS_DC)
ZEND_API zend_class_entry * zend_register_internal_class_ex (zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC)
ZEND_API zend_class_entry * zend_register_internal_interface (zend_class_entry *orig_class_entry TSRMLS_DC)
ZEND_API void zend_class_implements (zend_class_entry *class_entry TSRMLS_DC, int num_interfaces,...)
ZEND_API int zend_register_class_alias_ex (const char *name, int name_len, zend_class_entry *ce TSRMLS_DC)
ZEND_API int zend_disable_function (char *function_name, uint function_name_length TSRMLS_DC)
ZEND_API int zend_disable_class (char *class_name, uint class_name_length TSRMLS_DC)
ZEND_API void zend_wrong_param_count (TSRMLS_D)
ZEND_API zend_bool zend_is_callable_ex (zval *callable, zval *object_ptr, uint check_flags, char **callable_name, int *callable_name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC)
ZEND_API zend_bool zend_is_callable (zval *callable, uint check_flags, char **callable_name TSRMLS_DC)
ZEND_API zend_bool zend_make_callable (zval *callable, char **callable_name TSRMLS_DC)
ZEND_API const char * zend_get_module_version (const char *module_name)
ZEND_API int zend_get_module_started (const char *module_name)
ZEND_API int zend_declare_property (zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_ex (zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, char *doc_comment, int doc_comment_len TSRMLS_DC)
ZEND_API int zend_declare_property_null (zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_bool (zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_long (zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_double (zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_string (zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC)
ZEND_API int zend_declare_property_stringl (zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC)
ZEND_API int zend_declare_class_constant (zend_class_entry *ce, const char *name, size_t name_length, zval *value TSRMLS_DC)
ZEND_API int zend_declare_class_constant_null (zend_class_entry *ce, const char *name, size_t name_length TSRMLS_DC)
ZEND_API int zend_declare_class_constant_long (zend_class_entry *ce, const char *name, size_t name_length, long value TSRMLS_DC)
ZEND_API int zend_declare_class_constant_bool (zend_class_entry *ce, const char *name, size_t name_length, zend_bool value TSRMLS_DC)
ZEND_API int zend_declare_class_constant_double (zend_class_entry *ce, const char *name, size_t name_length, double value TSRMLS_DC)
ZEND_API int zend_declare_class_constant_stringl (zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length TSRMLS_DC)
ZEND_API int zend_declare_class_constant_string (zend_class_entry *ce, const char *name, size_t name_length, const char *value TSRMLS_DC)
ZEND_API void zend_update_class_constants (zend_class_entry *class_type TSRMLS_DC)
ZEND_API void zend_update_property (zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC)
ZEND_API void zend_update_property_null (zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC)
ZEND_API void zend_update_property_bool (zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC)
ZEND_API void zend_update_property_long (zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC)
ZEND_API void zend_update_property_double (zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC)
ZEND_API void zend_update_property_string (zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC)
ZEND_API void zend_update_property_stringl (zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC)
ZEND_API int zend_update_static_property (zend_class_entry *scope, char *name, int name_length, zval *value TSRMLS_DC)
ZEND_API int zend_update_static_property_null (zend_class_entry *scope, char *name, int name_length TSRMLS_DC)
ZEND_API int zend_update_static_property_bool (zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC)
ZEND_API int zend_update_static_property_long (zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC)
ZEND_API int zend_update_static_property_double (zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC)
ZEND_API int zend_update_static_property_string (zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC)
ZEND_API int zend_update_static_property_stringl (zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC)
ZEND_API zval * zend_read_property (zend_class_entry *scope, zval *object, char *name, int name_length, zend_bool silent TSRMLS_DC)
ZEND_API zval * zend_read_static_property (zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC)
ZEND_API zend_class_entry * zend_get_class_entry (const zval *zobject TSRMLS_DC)
ZEND_API int zend_get_object_classname (const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC)
ZEND_API char * zend_get_type_by_const (int type)
ZEND_API int _array_init (zval *arg, uint size ZEND_FILE_LINE_DC)
ZEND_API int _object_init (zval *arg ZEND_FILE_LINE_DC TSRMLS_DC)
ZEND_API int _object_init_ex (zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC TSRMLS_DC)
ZEND_API int _object_and_properties_init (zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC)
ZEND_API void zend_merge_properties (zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC)
ZEND_API int add_assoc_function (zval *arg, const char *key, void(*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
ZEND_API int add_assoc_long_ex (zval *arg, const char *key, uint key_len, long n)
ZEND_API int add_assoc_null_ex (zval *arg, const char *key, uint key_len)
ZEND_API int add_assoc_bool_ex (zval *arg, const char *key, uint key_len, int b)
ZEND_API int add_assoc_resource_ex (zval *arg, const char *key, uint key_len, int r)
ZEND_API int add_assoc_double_ex (zval *arg, const char *key, uint key_len, double d)
ZEND_API int add_assoc_string_ex (zval *arg, const char *key, uint key_len, char *str, int duplicate)
ZEND_API int add_assoc_stringl_ex (zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate)
ZEND_API int add_assoc_zval_ex (zval *arg, const char *key, uint key_len, zval *value)
ZEND_API int add_index_long (zval *arg, ulong idx, long n)
ZEND_API int add_index_null (zval *arg, ulong idx)
ZEND_API int add_index_bool (zval *arg, ulong idx, int b)
ZEND_API int add_index_resource (zval *arg, ulong idx, int r)
ZEND_API int add_index_double (zval *arg, ulong idx, double d)
ZEND_API int add_index_string (zval *arg, ulong idx, const char *str, int duplicate)
ZEND_API int add_index_stringl (zval *arg, ulong idx, const char *str, uint length, int duplicate)
ZEND_API int add_index_zval (zval *arg, ulong index, zval *value)
ZEND_API int add_next_index_long (zval *arg, long n)
ZEND_API int add_next_index_null (zval *arg)
ZEND_API int add_next_index_bool (zval *arg, int b)
ZEND_API int add_next_index_resource (zval *arg, int r)
ZEND_API int add_next_index_double (zval *arg, double d)
ZEND_API int add_next_index_string (zval *arg, const char *str, int duplicate)
ZEND_API int add_next_index_stringl (zval *arg, const char *str, uint length, int duplicate)
ZEND_API int add_next_index_zval (zval *arg, zval *value)
ZEND_API int add_get_assoc_string_ex (zval *arg, const char *key, uint key_len, const char *str, void **dest, int duplicate)
ZEND_API int add_get_assoc_stringl_ex (zval *arg, const char *key, uint key_len, const char *str, uint length, void **dest, int duplicate)
ZEND_API int add_get_index_long (zval *arg, ulong idx, long l, void **dest)
ZEND_API int add_get_index_double (zval *arg, ulong idx, double d, void **dest)
ZEND_API int add_get_index_string (zval *arg, ulong idx, const char *str, void **dest, int duplicate)
ZEND_API int add_get_index_stringl (zval *arg, ulong idx, const char *str, uint length, void **dest, int duplicate)
ZEND_API int add_property_long_ex (zval *arg, const char *key, uint key_len, long l TSRMLS_DC)
ZEND_API int add_property_null_ex (zval *arg, const char *key, uint key_len TSRMLS_DC)
ZEND_API int add_property_bool_ex (zval *arg, const char *key, uint key_len, int b TSRMLS_DC)
ZEND_API int add_property_resource_ex (zval *arg, const char *key, uint key_len, long r TSRMLS_DC)
ZEND_API int add_property_double_ex (zval *arg, const char *key, uint key_len, double d TSRMLS_DC)
ZEND_API int add_property_string_ex (zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC)
ZEND_API int add_property_stringl_ex (zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC)
ZEND_API int add_property_zval_ex (zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC)
ZEND_API int call_user_function (HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC)
ZEND_API int call_user_function_ex (HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC)
ZEND_API int zend_fcall_info_init (zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char **callable_name, char **error TSRMLS_DC)
 Build zend_call_info/cache from a zval*.
ZEND_API void zend_fcall_info_args_clear (zend_fcall_info *fci, int free_mem)
 Clear argumens connected with zend_fcall_info *fci If free_mem is not zero then the params array gets free'd as well.
ZEND_API void zend_fcall_info_args_save (zend_fcall_info *fci, int *param_count, zval ****params)
 Save current arguments from zend_fcall_info *fci params array will be set to NULL.
ZEND_API void zend_fcall_info_args_restore (zend_fcall_info *fci, int param_count, zval ***params)
 Free arguments connected with zend_fcall_info *fci andset back saved ones.
ZEND_API int zend_fcall_info_args (zend_fcall_info *fci, zval *args TSRMLS_DC)
 Set or clear the arguments in the zend_call_info struct taking care of refcount.
ZEND_API int zend_fcall_info_argp (zend_fcall_info *fci TSRMLS_DC, int argc, zval ***argv)
 Set arguments in the zend_fcall_info struct taking care of refcount.
ZEND_API int zend_fcall_info_argv (zend_fcall_info *fci TSRMLS_DC, int argc, va_list *argv)
 Set arguments in the zend_fcall_info struct taking care of refcount.
ZEND_API int zend_fcall_info_argn (zend_fcall_info *fci TSRMLS_DC, int argc,...)
 Set arguments in the zend_fcall_info struct taking care of refcount.
ZEND_API int zend_fcall_info_call (zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval **retval, zval *args TSRMLS_DC)
 Call a function using information created by zend_fcall_info_init()/args().
ZEND_API int zend_call_function (zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC)
ZEND_API int zend_set_hash_symbol (zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables,...)
ZEND_API int zend_delete_global_variable (char *name, int name_len TSRMLS_DC)
ZEND_API void zend_reset_all_cv (HashTable *symbol_table TSRMLS_DC)
ZEND_API void zend_rebuild_symbol_table (TSRMLS_D)
ZEND_API ZEND_FUNCTION (display_disabled_function)
ZEND_API ZEND_FUNCTION (display_disabled_class)

Variables

ZEND_API const zend_fcall_info empty_fcall_info
ZEND_API const
zend_fcall_info_cache 
empty_fcall_info_cache

Class Documentation

struct _zend_fcall_info

Definition at line 43 of file zend_API.h.

Collaboration diagram for _zend_fcall_info:
Class Members
zval * function_name
HashTable * function_table
zend_bool no_separation
zval * object_ptr
zend_uint param_count
zval *** params
zval ** retval_ptr_ptr
size_t size
HashTable * symbol_table
struct _zend_fcall_info_cache

Definition at line 55 of file zend_API.h.

Collaboration diagram for _zend_fcall_info_cache:
Class Members
zend_class_entry * called_scope
zend_class_entry * calling_scope
zend_function * function_handler
zend_bool initialized
zval * object_ptr

Define Documentation

#define add_assoc_bool (   __arg,
  __key,
  __b 
)    add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)

Definition at line 368 of file zend_API.h.

#define add_assoc_double (   __arg,
  __key,
  __d 
)    add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)

Definition at line 370 of file zend_API.h.

#define add_assoc_long (   __arg,
  __key,
  __n 
)    add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)

Definition at line 366 of file zend_API.h.

#define add_assoc_null (   __arg,
  __key 
)    add_assoc_null_ex(__arg, __key, strlen(__key) + 1)

Definition at line 367 of file zend_API.h.

#define add_assoc_resource (   __arg,
  __key,
  __r 
)    add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)

Definition at line 369 of file zend_API.h.

#define add_assoc_string (   __arg,
  __key,
  __str,
  __duplicate 
)    add_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)

Definition at line 371 of file zend_API.h.

#define add_assoc_stringl (   __arg,
  __key,
  __str,
  __length,
  __duplicate 
)    add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)

Definition at line 372 of file zend_API.h.

#define add_assoc_unset (   __arg,
  __key 
)    add_assoc_null_ex(__arg, __key, strlen(__key) + 1)

Definition at line 376 of file zend_API.h.

#define add_assoc_zval (   __arg,
  __key,
  __value 
)    add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)

Definition at line 373 of file zend_API.h.

#define add_get_assoc_string (   __arg,
  __key,
  __str,
  __dest,
  __duplicate 
)    add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)

Definition at line 402 of file zend_API.h.

#define add_get_assoc_stringl (   __arg,
  __key,
  __str,
  __length,
  __dest,
  __duplicate 
)    add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)

Definition at line 403 of file zend_API.h.

#define add_index_unset (   __arg,
  __key 
)    add_index_null(__arg, __key)

Definition at line 377 of file zend_API.h.

#define add_method (   arg,
  key,
  method 
)    add_assoc_function((arg), (key), (method))

Definition at line 499 of file zend_API.h.

#define add_next_index_unset (   __arg)    add_next_index_null(__arg)

Definition at line 378 of file zend_API.h.

#define add_property_bool (   __arg,
  __key,
  __b 
)    add_property_bool_ex(__arg, __key, strlen(__key)+1, __b TSRMLS_CC)

Definition at line 421 of file zend_API.h.

#define add_property_double (   __arg,
  __key,
  __d 
)    add_property_double_ex(__arg, __key, strlen(__key)+1, __d TSRMLS_CC)

Definition at line 423 of file zend_API.h.

#define add_property_long (   __arg,
  __key,
  __n 
)    add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC)

Definition at line 419 of file zend_API.h.

#define add_property_null (   __arg,
  __key 
)    add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC)

Definition at line 420 of file zend_API.h.

#define add_property_resource (   __arg,
  __key,
  __r 
)    add_property_resource_ex(__arg, __key, strlen(__key)+1, __r TSRMLS_CC)

Definition at line 422 of file zend_API.h.

#define add_property_string (   __arg,
  __key,
  __str,
  __duplicate 
)    add_property_string_ex(__arg, __key, strlen(__key)+1, __str, __duplicate TSRMLS_CC)

Definition at line 424 of file zend_API.h.

#define add_property_stringl (   __arg,
  __key,
  __str,
  __length,
  __duplicate 
)    add_property_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate TSRMLS_CC)

Definition at line 425 of file zend_API.h.

#define add_property_unset (   __arg,
  __key 
)    add_property_null(__arg, __key)

Definition at line 379 of file zend_API.h.

#define add_property_zval (   __arg,
  __key,
  __value 
)    add_property_zval_ex(__arg, __key, strlen(__key)+1, __value TSRMLS_CC)

Definition at line 426 of file zend_API.h.

#define ARG_COUNT (   dummy)    (ht)

Definition at line 333 of file zend_API.h.

#define array_init (   arg)    _array_init((arg), 0 ZEND_FILE_LINE_CC)

Definition at line 342 of file zend_API.h.

#define array_init_size (   arg,
  size 
)    _array_init((arg), (size) ZEND_FILE_LINE_CC)

Definition at line 343 of file zend_API.h.

#define CE_STATIC_MEMBERS (   ce)    ((ce)->static_members)

Definition at line 214 of file zend_API.h.

#define CHECK_ZVAL_STRING (   z)

Definition at line 511 of file zend_API.h.

#define CHECK_ZVAL_STRING_REL (   z)

Definition at line 512 of file zend_API.h.

#define DLEXPORT

Definition at line 339 of file zend_API.h.

#define getThis ( )    (this_ptr)

Definition at line 329 of file zend_API.h.

#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((p) TSRMLS_CC) : NULL)))

Definition at line 685 of file zend_API.h.

#define INIT_CLASS_ENTRY (   class_container,
  class_name,
  functions 
)    INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL)

Definition at line 162 of file zend_API.h.

#define INIT_CLASS_ENTRY_EX (   class_container,
  class_name,
  class_name_len,
  functions 
)    INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, NULL, NULL, NULL, NULL, NULL)

Definition at line 165 of file zend_API.h.

#define INIT_NS_CLASS_ENTRY (   class_container,
  ns,
  class_name,
  functions 
)    INIT_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions)

Definition at line 204 of file zend_API.h.

#define INIT_OVERLOADED_CLASS_ENTRY (   class_container,
  class_name,
  functions,
  handle_fcall,
  handle_propget,
  handle_propset 
)    INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, sizeof(class_name)-1, functions, handle_fcall, handle_propget, handle_propset, NULL, NULL)

Definition at line 201 of file zend_API.h.

#define INIT_OVERLOADED_CLASS_ENTRY_EX (   class_container,
  class_name,
  class_name_len,
  functions,
  handle_fcall,
  handle_propget,
  handle_propset,
  handle_propunset,
  handle_propisset 
)

Definition at line 168 of file zend_API.h.

#define INIT_OVERLOADED_NS_CLASS_ENTRY (   class_container,
  ns,
  class_name,
  functions,
  handle_fcall,
  handle_propget,
  handle_propset 
)    INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset)

Definition at line 208 of file zend_API.h.

#define INIT_OVERLOADED_NS_CLASS_ENTRY_EX (   class_container,
  ns,
  class_name,
  functions,
  handle_fcall,
  handle_propget,
  handle_propset,
  handle_propunset,
  handle_propisset 
)    INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, ZEND_NS_NAME(ns, class_name), sizeof(ZEND_NS_NAME(ns, class_name))-1, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset)

Definition at line 206 of file zend_API.h.

#define IS_CALLABLE_CHECK_IS_STATIC   (1<<2)

Definition at line 277 of file zend_API.h.

#define IS_CALLABLE_CHECK_NO_ACCESS   (1<<1)

Definition at line 276 of file zend_API.h.

#define IS_CALLABLE_CHECK_SILENT   (1<<3)

Definition at line 278 of file zend_API.h.

#define IS_CALLABLE_CHECK_SYNTAX_ONLY   (1<<0)

Definition at line 275 of file zend_API.h.

Definition at line 280 of file zend_API.h.

#define object_and_properties_init (   arg,
  ce,
  properties 
)    _object_and_properties_init((arg), (ce), (properties) ZEND_FILE_LINE_CC TSRMLS_CC)

Definition at line 346 of file zend_API.h.

#define object_init (   arg)    _object_init((arg) ZEND_FILE_LINE_CC TSRMLS_CC)

Definition at line 344 of file zend_API.h.

#define object_init_ex (   arg,
  ce 
)    _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC TSRMLS_CC)

Definition at line 345 of file zend_API.h.

#define RETURN_BOOL (   b)    { RETVAL_BOOL(b); return; }

Definition at line 592 of file zend_API.h.

#define RETURN_DOUBLE (   d)    { RETVAL_DOUBLE(d); return; }

Definition at line 595 of file zend_API.h.

#define RETURN_EMPTY_STRING ( )    { RETVAL_EMPTY_STRING(); return; }

Definition at line 598 of file zend_API.h.

#define RETURN_FALSE   { RETVAL_FALSE; return; }

Definition at line 600 of file zend_API.h.

#define RETURN_LONG (   l)    { RETVAL_LONG(l); return; }

Definition at line 594 of file zend_API.h.

#define RETURN_NULL ( )    { RETVAL_NULL(); return;}

Definition at line 593 of file zend_API.h.

#define RETURN_RESOURCE (   l)    { RETVAL_RESOURCE(l); return; }

Definition at line 591 of file zend_API.h.

#define RETURN_STRING (   s,
  duplicate 
)    { RETVAL_STRING(s, duplicate); return; }

Definition at line 596 of file zend_API.h.

#define RETURN_STRINGL (   s,
  l,
  duplicate 
)    { RETVAL_STRINGL(s, l, duplicate); return; }

Definition at line 597 of file zend_API.h.

#define RETURN_TRUE   { RETVAL_TRUE; return; }

Definition at line 601 of file zend_API.h.

#define RETURN_ZVAL (   zv,
  copy,
  dtor 
)    { RETVAL_ZVAL(zv, copy, dtor); return; }

Definition at line 599 of file zend_API.h.

#define RETVAL_BOOL (   b)    ZVAL_BOOL(return_value, b)

Definition at line 580 of file zend_API.h.

#define RETVAL_DOUBLE (   d)    ZVAL_DOUBLE(return_value, d)

Definition at line 583 of file zend_API.h.

#define RETVAL_EMPTY_STRING ( )    ZVAL_EMPTY_STRING(return_value)

Definition at line 586 of file zend_API.h.

#define RETVAL_FALSE   ZVAL_BOOL(return_value, 0)

Definition at line 588 of file zend_API.h.

#define RETVAL_LONG (   l)    ZVAL_LONG(return_value, l)

Definition at line 582 of file zend_API.h.

#define RETVAL_NULL ( )    ZVAL_NULL(return_value)

Definition at line 581 of file zend_API.h.

#define RETVAL_RESOURCE (   l)    ZVAL_RESOURCE(return_value, l)

Definition at line 579 of file zend_API.h.

#define RETVAL_STRING (   s,
  duplicate 
)    ZVAL_STRING(return_value, s, duplicate)

Definition at line 584 of file zend_API.h.

#define RETVAL_STRINGL (   s,
  l,
  duplicate 
)    ZVAL_STRINGL(return_value, s, l, duplicate)

Definition at line 585 of file zend_API.h.

#define RETVAL_TRUE   ZVAL_BOOL(return_value, 1)

Definition at line 589 of file zend_API.h.

#define RETVAL_ZVAL (   zv,
  copy,
  dtor 
)    ZVAL_ZVAL(return_value, zv, copy, dtor)

Definition at line 587 of file zend_API.h.

#define SET_VAR_DOUBLE (   n,
 
)
Value:
{                                                                                                        \
                                                        {                                                                                                 \
                                                               zval *var;                                                                          \
                                                               ALLOC_ZVAL(var);                                                             \
                                                               ZVAL_DOUBLE(var, v);                                                  \
                                                               ZEND_SET_GLOBAL_VAR(n, var);                                          \
                                                        }                                                                                                 \
                                                 }

Definition at line 630 of file zend_API.h.

#define SET_VAR_LONG (   n,
 
)
Value:
{                                                                                                        \
                                                        {                                                                                                 \
                                                               zval *var;                                                                          \
                                                               ALLOC_ZVAL(var);                                                             \
                                                               ZVAL_LONG(var, v);                                                           \
                                                               ZEND_SET_GLOBAL_VAR(n, var);                                          \
                                                        }                                                                                                 \
                                                 }

Definition at line 621 of file zend_API.h.

#define SET_VAR_STRING (   n,
 
)
Value:
{                                                                                                                                           \
                                                        {                                                                                                                                    \
                                                               zval *var;                                                                                                             \
                                                               ALLOC_ZVAL(var);                                                                                                \
                                                               ZVAL_STRING(var, v, 0);                                                                                         \
                                                               ZEND_SET_GLOBAL_VAR(n, var);                                                                             \
                                                        }                                                                                                                                    \
                                                 }

Definition at line 603 of file zend_API.h.

#define SET_VAR_STRINGL (   n,
  v,
  l 
)
Value:
{                                                                                                 \
                                                               {                                                                                          \
                                                                      zval *var;                                                                   \
                                                                      ALLOC_ZVAL(var);                                                      \
                                                                      ZVAL_STRINGL(var, v, l, 0);                                    \
                                                                      ZEND_SET_GLOBAL_VAR(n, var);                                   \
                                                               }                                                                                          \
                                                        }

Definition at line 612 of file zend_API.h.

Definition at line 331 of file zend_API.h.

Definition at line 332 of file zend_API.h.

#define ZEND_ABSTRACT_ME (   classname,
  name,
  arg_info 
)    ZEND_FENTRY(name, NULL, arg_info, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)

Definition at line 83 of file zend_API.h.

#define ZEND_ARG_ARRAY_INFO (   pass_by_ref,
  name,
  allow_null 
)    { #name, sizeof(#name)-1, NULL, 0, 1, allow_null, pass_by_ref, 0, 0 },

Definition at line 104 of file zend_API.h.

#define ZEND_ARG_INFO (   pass_by_ref,
  name 
)    { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref, 0, 0 },

Definition at line 101 of file zend_API.h.

#define ZEND_ARG_OBJ_INFO (   pass_by_ref,
  name,
  classname,
  allow_null 
)    { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 },

Definition at line 103 of file zend_API.h.

#define ZEND_ARG_PASS_INFO (   pass_by_ref)    { NULL, 0, NULL, 0, 0, 0, pass_by_ref, 0, 0 },

Definition at line 102 of file zend_API.h.

#define ZEND_BEGIN_ARG_INFO (   name,
  pass_rest_by_reference 
)    ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1)

Definition at line 108 of file zend_API.h.

#define ZEND_BEGIN_ARG_INFO_EX (   name,
  pass_rest_by_reference,
  return_reference,
  required_num_args 
)
Value:
static const zend_arg_info name[] = {                                                                                                                            \
              { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args },

Definition at line 105 of file zend_API.h.

#define ZEND_BEGIN_MODULE_GLOBALS (   module_name)    typedef struct _zend_##module_name##_globals {

Definition at line 137 of file zend_API.h.

#define ZEND_DECLARE_MODULE_GLOBALS (   module_name)    zend_##module_name##_globals module_name##_globals;

Definition at line 153 of file zend_API.h.

#define ZEND_DEFINE_PROPERTY (   class_ptr,
  name,
  value,
  mask 
)
Value:
{                                                                                                                                                  \
       char *_name = (name);                                                                                                         \
       int namelen = strlen(_name);                                                                                           \
       zend_declare_property(class_ptr, _name, namelen, value, mask TSRMLS_CC);            \
}

Definition at line 678 of file zend_API.h.

#define ZEND_DEP_FALIAS (   name,
  alias,
  arg_info 
)    ZEND_FENTRY(name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)

Definition at line 80 of file zend_API.h.

#define ZEND_DEP_FE (   name,
  arg_info 
)    ZEND_FENTRY(name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)

Definition at line 78 of file zend_API.h.

ZEND_END_ARG_INFO ( )    };

Definition at line 110 of file zend_API.h.

#define ZEND_END_MODULE_GLOBALS (   module_name)    } zend_##module_name##_globals;

Definition at line 139 of file zend_API.h.

#define ZEND_EXTERN_MODULE_GLOBALS (   module_name)    extern zend_##module_name##_globals module_name##_globals;

Definition at line 155 of file zend_API.h.

#define ZEND_FALIAS (   name,
  alias,
  arg_info 
)    ZEND_FENTRY(name, ZEND_FN(alias), arg_info, 0)

Definition at line 79 of file zend_API.h.

#define ZEND_FCI_INITIALIZED (   fci)    ((fci).size != 0)

Definition at line 217 of file zend_API.h.

#define ZEND_FE (   name,
  arg_info 
)    ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)

Definition at line 77 of file zend_API.h.

#define ZEND_FE_END   { NULL, NULL, NULL, 0, 0 }

Definition at line 99 of file zend_API.h.

#define ZEND_FENTRY (   zend_name,
  name,
  arg_info,
  flags 
)    { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },

Definition at line 71 of file zend_API.h.

#define ZEND_FN (   name)    zif_##name

Definition at line 65 of file zend_API.h.

#define ZEND_FUNCTION (   name)    ZEND_NAMED_FUNCTION(ZEND_FN(name))

Definition at line 68 of file zend_API.h.

#define ZEND_GET_MODULE (   name)
Value:
BEGIN_EXTERN_C()\
       ZEND_DLEXPORT zend_module_entry *get_module(void) { return &name##_module_entry; }\
    END_EXTERN_C()

Definition at line 132 of file zend_API.h.

#define zend_get_parameters_array (   ht,
  param_count,
  argument_array 
)    _zend_get_parameters_array(ht, param_count, argument_array TSRMLS_CC)

Definition at line 230 of file zend_API.h.

#define zend_get_parameters_array_ex (   param_count,
  argument_array 
)    _zend_get_parameters_array_ex(param_count, argument_array TSRMLS_CC)

Definition at line 232 of file zend_API.h.

#define ZEND_GINIT (   module)    ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_CTOR_N(module)))

Definition at line 694 of file zend_API.h.

Definition at line 702 of file zend_API.h.

#define ZEND_GSHUTDOWN (   module)    ((void (*)(void* TSRMLS_DC))(ZEND_MODULE_GLOBALS_DTOR_N(module)))

Definition at line 695 of file zend_API.h.

Definition at line 703 of file zend_API.h.

#define ZEND_INIT_MODULE_GLOBALS (   module_name,
  globals_ctor,
  globals_dtor 
)    globals_ctor(&module_name##_globals);

Definition at line 157 of file zend_API.h.

#define ZEND_MALIAS (   classname,
  name,
  alias,
  arg_info,
  flags 
)    ZEND_FENTRY(name, ZEND_MN(classname##_##alias), arg_info, flags)

Definition at line 84 of file zend_API.h.

#define ZEND_ME (   classname,
  name,
  arg_info,
  flags 
)    ZEND_FENTRY(name, ZEND_MN(classname##_##name), arg_info, flags)

Definition at line 82 of file zend_API.h.

#define ZEND_ME_MAPPING (   name,
  func_name,
  arg_types,
  flags 
)    ZEND_NAMED_ME(name, ZEND_FN(func_name), arg_types, flags)

Definition at line 86 of file zend_API.h.

#define ZEND_METHOD (   classname,
  name 
)    ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name))

Definition at line 69 of file zend_API.h.

Definition at line 693 of file zend_API.h.

Definition at line 701 of file zend_API.h.

Definition at line 689 of file zend_API.h.

Definition at line 697 of file zend_API.h.

#define ZEND_MN (   name)    zim_##name

Definition at line 66 of file zend_API.h.

Definition at line 125 of file zend_API.h.

#define ZEND_MODULE_ACTIVATE_N (   module)    zm_activate_##module

Definition at line 115 of file zend_API.h.

Definition at line 126 of file zend_API.h.

#define ZEND_MODULE_DEACTIVATE_N (   module)    zm_deactivate_##module

Definition at line 116 of file zend_API.h.

#define ZEND_MODULE_GLOBALS_CTOR_D (   module)    void ZEND_MODULE_GLOBALS_CTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC)

Definition at line 129 of file zend_API.h.

#define ZEND_MODULE_GLOBALS_CTOR_N (   module)    zm_globals_ctor_##module

Definition at line 119 of file zend_API.h.

#define ZEND_MODULE_GLOBALS_DTOR_D (   module)    void ZEND_MODULE_GLOBALS_DTOR_N(module)(zend_##module##_globals *module##_globals TSRMLS_DC)

Definition at line 130 of file zend_API.h.

#define ZEND_MODULE_GLOBALS_DTOR_N (   module)    zm_globals_dtor_##module

Definition at line 120 of file zend_API.h.

Definition at line 128 of file zend_API.h.

#define ZEND_MODULE_INFO_N (   module)    zm_info_##module

Definition at line 118 of file zend_API.h.

Definition at line 127 of file zend_API.h.

#define ZEND_MODULE_POST_ZEND_DEACTIVATE_N (   module)    zm_post_zend_deactivate_##module

Definition at line 117 of file zend_API.h.

Definition at line 124 of file zend_API.h.

#define ZEND_MODULE_SHUTDOWN_N (   module)    zm_shutdown_##module

Definition at line 114 of file zend_API.h.

Definition at line 123 of file zend_API.h.

#define ZEND_MODULE_STARTUP_N (   module)    zm_startup_##module

Definition at line 113 of file zend_API.h.

Definition at line 690 of file zend_API.h.

Definition at line 698 of file zend_API.h.

#define ZEND_NAMED_FE (   zend_name,
  name,
  arg_info 
)    ZEND_FENTRY(zend_name, name, arg_info, 0)

Definition at line 76 of file zend_API.h.

#define ZEND_NAMED_FUNCTION (   name)    void name(INTERNAL_FUNCTION_PARAMETERS)

Definition at line 67 of file zend_API.h.

#define ZEND_NAMED_ME (   zend_name,
  name,
  arg_info,
  flags 
)    ZEND_FENTRY(zend_name, name, arg_info, flags)

Definition at line 81 of file zend_API.h.

#define ZEND_NS_DEP_FALIAS (   ns,
  name,
  alias,
  arg_info 
)    ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, ZEND_ACC_DEPRECATED)

Definition at line 97 of file zend_API.h.

#define ZEND_NS_DEP_FE (   ns,
  name,
  arg_info 
)    ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)

Definition at line 95 of file zend_API.h.

#define ZEND_NS_FALIAS (   ns,
  name,
  alias,
  arg_info 
)    ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)

Definition at line 96 of file zend_API.h.

#define ZEND_NS_FE (   ns,
  name,
  arg_info 
)    ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)

Definition at line 94 of file zend_API.h.

#define ZEND_NS_FENTRY (   ns,
  zend_name,
  name,
  arg_info,
  flags 
)    ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, #zend_name), name, arg_info, flags)

Definition at line 88 of file zend_API.h.

#define ZEND_NS_NAME (   ns,
  name 
)    ns"\\"name

Definition at line 63 of file zend_API.h.

#define ZEND_NS_NAMED_FE (   ns,
  zend_name,
  name,
  arg_info 
)    ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)

Definition at line 93 of file zend_API.h.

#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)

Definition at line 90 of file zend_API.h.

#define ZEND_NS_RAW_NAMED_FE (   ns,
  zend_name,
  name,
  arg_info 
)    ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)

Definition at line 91 of file zend_API.h.

#define ZEND_NUM_ARGS ( )    (ht)

Definition at line 334 of file zend_API.h.

Definition at line 234 of file zend_API.h.

#define ZEND_PARSE_PARAMS_QUIET   1<<1

Definition at line 239 of file zend_API.h.

#define ZEND_RAW_FENTRY (   zend_name,
  name,
  arg_info,
  flags 
)    { zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },

Definition at line 73 of file zend_API.h.

#define ZEND_RAW_NAMED_FE (   zend_name,
  name,
  arg_info 
)    ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0)

Definition at line 74 of file zend_API.h.

#define zend_register_class_alias (   name,
  ce 
)    zend_register_class_alias_ex(name, sizeof(name)-1, ce TSRMLS_DC)

Definition at line 265 of file zend_API.h.

#define zend_register_ns_class_alias (   ns,
  name,
  ce 
)    zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce TSRMLS_DC)

Definition at line 267 of file zend_API.h.

Definition at line 691 of file zend_API.h.

Definition at line 699 of file zend_API.h.

Definition at line 692 of file zend_API.h.

Definition at line 700 of file zend_API.h.

#define ZEND_SET_GLOBAL_VAR (   name,
  var 
)    ZEND_SET_SYMBOL(&EG(symbol_table), name, var)

Definition at line 672 of file zend_API.h.

#define ZEND_SET_GLOBAL_VAR_WITH_LENGTH (   name,
  name_length,
  var,
  _refcount,
  _is_ref 
)    ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), name, name_length, var, _refcount, _is_ref)

Definition at line 675 of file zend_API.h.

#define ZEND_SET_SYMBOL (   symtable,
  name,
  var 
)
Value:
{                                                                                                                                           \
              char *_name = (name);                                                                                                  \
																					\
		ZEND_SET_SYMBOL_WITH_LENGTH(symtable, _name, strlen(_name)+1, var, 1, 0);  \
       }

Definition at line 640 of file zend_API.h.

#define ZEND_SET_SYMBOL_WITH_LENGTH (   symtable,
  name,
  name_length,
  var,
  _refcount,
  _is_ref 
)
Value:
{                                                                                                                                                                              \
              zval **orig_var;                                                                                                                                          \
																										\
		if (zend_hash_find(symtable, (name), (name_length), (void **) &orig_var)==SUCCESS                      \
                     && PZVAL_IS_REF(*orig_var)) {                                                                                                               \
                     Z_SET_REFCOUNT_P(var, Z_REFCOUNT_PP(orig_var));                                                                               \
                     Z_SET_ISREF_P(var);                                                                                                                                \
																										\
			if (_refcount) {                                                                                                                                \
                            Z_SET_REFCOUNT_P(var, Z_REFCOUNT_P(var) + _refcount - 1);                                                       \
                     }                                                                                                                                                                \
                     zval_dtor(*orig_var);                                                                                                                              \
                     **orig_var = *(var);                                                                                                                        \
                     FREE_ZVAL(var);                                                                                                                                           \
              } else {                                                                                                                                                         \
                     Z_SET_ISREF_TO_P(var, _is_ref);                                                                                                             \
                     if (_refcount) {                                                                                                                                   \
                            Z_SET_REFCOUNT_P(var, _refcount);                                                                                             \
                     }                                                                                                                                                                \
                     zend_hash_update(symtable, (name), (name_length), &(var), sizeof(zval *), NULL);                  \
              }                                                                                                                                                                       \
       }

Definition at line 647 of file zend_API.h.

Definition at line 335 of file zend_API.h.

Definition at line 336 of file zend_API.h.

#define ZVAL_BOOL (   z,
 
)
Value:
{                    \
              Z_TYPE_P(z) = IS_BOOL;             \
              Z_LVAL_P(z) = ((b) != 0);   \
       }

Definition at line 520 of file zend_API.h.

#define ZVAL_DOUBLE (   z,
  d 
)
Value:
{                    \
              Z_TYPE_P(z) = IS_DOUBLE;    \
              Z_DVAL_P(z) = d;                   \
       }

Definition at line 534 of file zend_API.h.

#define ZVAL_EMPTY_STRING (   z)
Value:
{             \
              Z_STRLEN_P(z) = 0;                 \
              Z_STRVAL_P(z) = STR_EMPTY_ALLOC();\
              Z_TYPE_P(z) = IS_STRING;    \
       }

Definition at line 553 of file zend_API.h.

#define ZVAL_FALSE (   z)    ZVAL_BOOL(z, 0)

Definition at line 576 of file zend_API.h.

#define ZVAL_IS_NULL (   z)    (Z_TYPE_P(z)==IS_NULL)

Definition at line 686 of file zend_API.h.

#define ZVAL_LONG (   z,
  l 
)
Value:
{                    \
              Z_TYPE_P(z) = IS_LONG;             \
              Z_LVAL_P(z) = l;                   \
       }

Definition at line 529 of file zend_API.h.

#define ZVAL_NULL (   z)
Value:
{                           \
              Z_TYPE_P(z) = IS_NULL;             \
       }

Definition at line 525 of file zend_API.h.

#define ZVAL_RESOURCE (   z,
  l 
)
Value:
{             \
              Z_TYPE_P(z) = IS_RESOURCE;  \
              Z_LVAL_P(z) = l;                   \
       }

Definition at line 515 of file zend_API.h.

#define ZVAL_STRING (   z,
  s,
  duplicate 
)
Value:
{      \
              const char *__s=(s);               \
              Z_STRLEN_P(z) = strlen(__s);       \
              Z_STRVAL_P(z) = (duplicate?estrndup(__s, Z_STRLEN_P(z)):(char*)__s);\
              Z_TYPE_P(z) = IS_STRING;           \
       }

Definition at line 539 of file zend_API.h.

#define ZVAL_STRINGL (   z,
  s,
  l,
  duplicate 
)
Value:
{      \
              const char *__s=(s); int __l=l;           \
              Z_STRLEN_P(z) = __l;                      \
              Z_STRVAL_P(z) = (duplicate?estrndup(__s, __l):(char*)__s);\
              Z_TYPE_P(z) = IS_STRING;                  \
       }

Definition at line 546 of file zend_API.h.

#define ZVAL_TRUE (   z)    ZVAL_BOOL(z, 1)

Definition at line 577 of file zend_API.h.

#define ZVAL_ZVAL (   z,
  zv,
  copy,
  dtor 
)
Value:
{                    \
		zend_uchar is_ref = Z_ISREF_P(z);              \
		zend_uint refcount = Z_REFCOUNT_P(z);   \
              *(z) = *(zv);                                           \
              if (copy) {                                                    \
                     zval_copy_ctor(z);                               \
           }                                                                 \
              if (dtor) {                                                    \
                     if (!copy) {                                     \
                            ZVAL_NULL(zv);                                   \
                     }                                                              \
                     zval_ptr_dtor(&zv);                              \
           }                                                                 \
              Z_SET_ISREF_TO_P(z, is_ref);                     \
              Z_SET_REFCOUNT_P(z, refcount);                   \
       }

Definition at line 559 of file zend_API.h.


Typedef Documentation


Function Documentation

ZEND_API int _array_init ( zval *  arg,
uint size  ZEND_FILE_LINE_DC 
)

Definition at line 956 of file zend_API.c.

Here is the call graph for this function:

ZEND_API int _object_and_properties_init ( zval *  arg,
zend_class_entry *  ce,
HashTable *properties ZEND_FILE_LINE_DC  TSRMLS_DC 
)

Definition at line 1066 of file zend_API.c.

{
       zval *tmp;
       zend_object *object;

       if (class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
              char *what = class_type->ce_flags & ZEND_ACC_INTERFACE ? "interface" : "abstract class";
              zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
       }

       zend_update_class_constants(class_type TSRMLS_CC);

       Z_TYPE_P(arg) = IS_OBJECT;
       if (class_type->create_object == NULL) {
              Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC);
              if (properties) {
                     object->properties = properties;
              } else {
                     ALLOC_HASHTABLE_REL(object->properties);
                     zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
                     zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
              }
       } else {
              Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);
       }
       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int _object_init ( zval *arg ZEND_FILE_LINE_DC  TSRMLS_DC)

Definition at line 1101 of file zend_API.c.

Here is the call graph for this function:

ZEND_API int _object_init_ex ( zval *  arg,
zend_class_entry *ce ZEND_FILE_LINE_DC  TSRMLS_DC 
)
ZEND_API int _zend_get_parameters_array ( int  ht,
int  param_count,
zval **argument_array  TSRMLS_DC 
)

Definition at line 80 of file zend_API.c.

{
       void **p;
       int arg_count;
       zval *param_ptr;

       p = zend_vm_stack_top(TSRMLS_C) - 1;
       arg_count = (int)(zend_uintptr_t) *p;

       if (param_count>arg_count) {
              return FAILURE;
       }

       while (param_count-->0) {
              param_ptr = *(p-arg_count);
              if (!PZVAL_IS_REF(param_ptr) && Z_REFCOUNT_P(param_ptr) > 1) {
                     zval *new_tmp;

                     ALLOC_ZVAL(new_tmp);
                     *new_tmp = *param_ptr;
                     zval_copy_ctor(new_tmp);
                     INIT_PZVAL(new_tmp);
                     param_ptr = new_tmp;
                     Z_DELREF_P((zval *) *(p-arg_count));
                     *(p-arg_count) = param_ptr;
              }
              *(argument_array++) = param_ptr;
              arg_count--;
       }

       return SUCCESS;
}

Here is the call graph for this function:

ZEND_API int _zend_get_parameters_array_ex ( int  param_count,
zval ***argument_array  TSRMLS_DC 
)

Definition at line 142 of file zend_API.c.

{
       void **p;
       int arg_count;

       p = zend_vm_stack_top(TSRMLS_C) - 1;
       arg_count = (int)(zend_uintptr_t) *p;

       if (param_count>arg_count) {
              return FAILURE;
       }

       while (param_count-->0) {
              zval **value = (zval**)(p-arg_count);

              *(argument_array++) = value;
              arg_count--;
       }

       return SUCCESS;
}

Here is the call graph for this function:

ZEND_API int add_assoc_bool_ex ( zval *  arg,
const char *  key,
uint  key_len,
int  b 
)

Definition at line 1136 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_BOOL(tmp, b);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_assoc_double_ex ( zval *  arg,
const char *  key,
uint  key_len,
double  d 
)

Definition at line 1158 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_DOUBLE(tmp, d);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

ZEND_API int add_assoc_function ( zval *  arg,
const char *  key,
void(*)(INTERNAL_FUNCTION_PARAMETERS function_ptr 
)

Definition at line 1107 of file zend_API.c.

{
       zend_error(E_WARNING, "add_assoc_function() is no longer supported");
       return FAILURE;
}

Here is the call graph for this function:

ZEND_API int add_assoc_long_ex ( zval *  arg,
const char *  key,
uint  key_len,
long  n 
)

Definition at line 1114 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_LONG(tmp, n);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_assoc_null_ex ( zval *  arg,
const char *  key,
uint  key_len 
)

Definition at line 1125 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_NULL(tmp);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_assoc_resource_ex ( zval *  arg,
const char *  key,
uint  key_len,
int  r 
)

Definition at line 1147 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_RESOURCE(tmp, r);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

ZEND_API int add_assoc_string_ex ( zval *  arg,
const char *  key,
uint  key_len,
char *  str,
int  duplicate 
)

Definition at line 1169 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_assoc_stringl_ex ( zval *  arg,
const char *  key,
uint  key_len,
char *  str,
uint  length,
int  duplicate 
)

Definition at line 1180 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_assoc_zval_ex ( zval *  arg,
const char *  key,
uint  key_len,
zval *  value 
)

Definition at line 1191 of file zend_API.c.

{
       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int add_get_assoc_string_ex ( zval *  arg,
const char *  key,
uint  key_len,
const char *  str,
void **  dest,
int  duplicate 
)

Definition at line 1363 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
}

Here is the call graph for this function:

ZEND_API int add_get_assoc_stringl_ex ( zval *  arg,
const char *  key,
uint  key_len,
const char *  str,
uint  length,
void **  dest,
int  duplicate 
)

Definition at line 1374 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), dest);
}

Here is the call graph for this function:

ZEND_API int add_get_index_double ( zval *  arg,
ulong  idx,
double  d,
void **  dest 
)

Definition at line 1396 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_DOUBLE(tmp, d);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}
ZEND_API int add_get_index_long ( zval *  arg,
ulong  idx,
long  l,
void **  dest 
)

Definition at line 1385 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_LONG(tmp, l);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}

Here is the caller graph for this function:

ZEND_API int add_get_index_string ( zval *  arg,
ulong  idx,
const char *  str,
void **  dest,
int  duplicate 
)

Definition at line 1407 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}
ZEND_API int add_get_index_stringl ( zval *  arg,
ulong  idx,
const char *  str,
uint  length,
void **  dest,
int  duplicate 
)

Definition at line 1418 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}

Here is the caller graph for this function:

ZEND_API int add_index_bool ( zval *  arg,
ulong  idx,
int  b 
)

Definition at line 1219 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_BOOL(tmp, b);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_double ( zval *  arg,
ulong  idx,
double  d 
)

Definition at line 1241 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_DOUBLE(tmp, d);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_long ( zval *  arg,
ulong  idx,
long  n 
)

Definition at line 1197 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_LONG(tmp, n);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_null ( zval *  arg,
ulong  idx 
)

Definition at line 1208 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_NULL(tmp);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_resource ( zval *  arg,
ulong  idx,
int  r 
)

Definition at line 1230 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_RESOURCE(tmp, r);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
ZEND_API int add_index_string ( zval *  arg,
ulong  idx,
const char *  str,
int  duplicate 
)

Definition at line 1252 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_stringl ( zval *  arg,
ulong  idx,
const char *  str,
uint  length,
int  duplicate 
)

Definition at line 1263 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_index_zval ( zval *  arg,
ulong  index,
zval *  value 
)

Definition at line 1274 of file zend_API.c.

{
       return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &value, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_bool ( zval *  arg,
int  b 
)

Definition at line 1302 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_BOOL(tmp, b);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_double ( zval *  arg,
double  d 
)

Definition at line 1324 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_DOUBLE(tmp, d);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_long ( zval *  arg,
long  n 
)

Definition at line 1280 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_LONG(tmp, n);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_null ( zval *  arg)

Definition at line 1291 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_NULL(tmp);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_resource ( zval *  arg,
int  r 
)

Definition at line 1313 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_RESOURCE(tmp, r);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}
ZEND_API int add_next_index_string ( zval *  arg,
const char *  str,
int  duplicate 
)

Definition at line 1335 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_stringl ( zval *  arg,
const char *  str,
uint  length,
int  duplicate 
)

Definition at line 1346 of file zend_API.c.

{
       zval *tmp;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_next_index_zval ( zval *  arg,
zval *  value 
)

Definition at line 1357 of file zend_API.c.

{
       return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &value, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int add_property_bool_ex ( zval *  arg,
const char *  key,
uint  key_len,
int TSRMLS_DC 
)

Definition at line 1447 of file zend_API.c.

{
       zval *tmp;
       zval *z_key;

       MAKE_STD_ZVAL(tmp);
       ZVAL_BOOL(tmp, b);

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
       zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}
ZEND_API int add_property_double_ex ( zval *  arg,
const char *  key,
uint  key_len,
double d  TSRMLS_DC 
)

Definition at line 1501 of file zend_API.c.

{
       zval *tmp;
       zval *z_key;

       MAKE_STD_ZVAL(tmp);
       ZVAL_DOUBLE(tmp, d);

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
       zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}
ZEND_API int add_property_long_ex ( zval *  arg,
const char *  key,
uint  key_len,
long l  TSRMLS_DC 
)
ZEND_API int add_property_null_ex ( zval *  arg,
const char *  key,
uint key_len  TSRMLS_DC 
)

Definition at line 1465 of file zend_API.c.

{
       zval *tmp;
       zval *z_key;

       MAKE_STD_ZVAL(tmp);
       ZVAL_NULL(tmp);

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
       zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}
ZEND_API int add_property_resource_ex ( zval *  arg,
const char *  key,
uint  key_len,
long r  TSRMLS_DC 
)
ZEND_API int add_property_string_ex ( zval *  arg,
const char *  key,
uint  key_len,
char *  str,
int duplicate  TSRMLS_DC 
)

Definition at line 1519 of file zend_API.c.

{
       zval *tmp;
       zval *z_key;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRING(tmp, str, duplicate);

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
       zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}
ZEND_API int add_property_stringl_ex ( zval *  arg,
const char *  key,
uint  key_len,
char *  str,
uint  length,
int duplicate  TSRMLS_DC 
)

Definition at line 1537 of file zend_API.c.

{
       zval *tmp;
       zval *z_key;

       MAKE_STD_ZVAL(tmp);
       ZVAL_STRINGL(tmp, str, length, duplicate);

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
       zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}
ZEND_API int add_property_zval_ex ( zval *  arg,
const char *  key,
uint  key_len,
zval *value  TSRMLS_DC 
)

Definition at line 1555 of file zend_API.c.

{
       zval *z_key;

       MAKE_STD_ZVAL(z_key);
       ZVAL_STRINGL(z_key, key, key_len-1, 1);

       Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value TSRMLS_CC);
       zval_ptr_dtor(&z_key);
       return SUCCESS;
}

Here is the caller graph for this function:

ZEND_API int call_user_function ( HashTable function_table,
zval **  object_pp,
zval *  function_name,
zval *  retval_ptr,
zend_uint  param_count,
zval *params[]  TSRMLS_DC 
)

Definition at line 716 of file zend_execute_API.c.

{
       zval ***params_array;
       zend_uint i;
       int ex_retval;
       zval *local_retval_ptr = NULL;

       if (param_count) {
              params_array = (zval ***) emalloc(sizeof(zval **)*param_count);
              for (i=0; i<param_count; i++) {
                     params_array[i] = &params[i];
              }
       } else {
              params_array = NULL;
       }
       ex_retval = call_user_function_ex(function_table, object_pp, function_name, &local_retval_ptr, param_count, params_array, 1, NULL TSRMLS_CC);
       if (local_retval_ptr) {
              COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
       } else {
              INIT_ZVAL(*retval_ptr);
       }
       if (params_array) {
              efree(params_array);
       }
       return ex_retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int call_user_function_ex ( HashTable function_table,
zval **  object_pp,
zval *  function_name,
zval **  retval_ptr_ptr,
zend_uint  param_count,
zval **  params[],
int  no_separation,
HashTable *symbol_table  TSRMLS_DC 
)

Definition at line 744 of file zend_execute_API.c.

{
       zend_fcall_info fci;

       fci.size = sizeof(fci);
       fci.function_table = function_table;
       fci.object_ptr = object_pp ? *object_pp : NULL;
       fci.function_name = function_name;
       fci.retval_ptr_ptr = retval_ptr_ptr;
       fci.param_count = param_count;
       fci.params = params;
       fci.no_separation = (zend_bool) no_separation;
       fci.symbol_table = symbol_table;

       return zend_call_function(&fci, NULL TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_call_function ( zend_fcall_info fci,
zend_fcall_info_cache *fci_cache  TSRMLS_DC 
)

Definition at line 762 of file zend_execute_API.c.

{
       zend_uint i;
       zval **original_return_value;
       HashTable *calling_symbol_table;
       zend_op_array *original_op_array;
       zend_op **original_opline_ptr;
       zend_class_entry *current_scope;
       zend_class_entry *current_called_scope;
       zend_class_entry *calling_scope = NULL;
       zend_class_entry *called_scope = NULL;
       zval *current_this;
       zend_execute_data execute_data;

       *fci->retval_ptr_ptr = NULL;

       if (!EG(active)) {
              return FAILURE; /* executor is already inactive */
       }

       if (EG(exception)) {
              return FAILURE; /* we would result in an instable executor otherwise */
       }

       switch (fci->size) {
              case sizeof(zend_fcall_info):
                     break; /* nothing to do currently */
              default:
                     zend_error(E_ERROR, "Corrupted fcall_info provided to zend_call_function()");
                     break;
       }

       /* Initialize execute_data */
       if (EG(current_execute_data)) {
              execute_data = *EG(current_execute_data);
              EX(op_array) = NULL;
              EX(opline) = NULL;
              EX(object) = NULL;
       } else {
              /* This only happens when we're called outside any execute()'s
               * It shouldn't be strictly necessary to NULL execute_data out,
               * but it may make bugs easier to spot
               */
              memset(&execute_data, 0, sizeof(zend_execute_data));
       }

       if (!fci_cache || !fci_cache->initialized) {
              zend_fcall_info_cache fci_cache_local;
              char *callable_name;
              char *error = NULL;

              if (!fci_cache) {
                     fci_cache = &fci_cache_local;
              }

              if (!zend_is_callable_ex(fci->function_name, fci->object_ptr, IS_CALLABLE_CHECK_SILENT, &callable_name, NULL, fci_cache, &error TSRMLS_CC)) {
                     if (error) {
                            zend_error(E_WARNING, "Invalid callback %s, %s", callable_name, error);
                            efree(error);
                     }
                     if (callable_name) {
                            efree(callable_name);
                     }
                     return FAILURE;
              } else if (error) {
                     /* Capitalize the first latter of the error message */
                     if (error[0] >= 'a' && error[0] <= 'z') {
                            error[0] += ('A' - 'a');
                     }
                     zend_error(E_STRICT, "%s", error);
                     efree(error);
              }
              efree(callable_name);
       }

       EX(function_state).function = fci_cache->function_handler;
       calling_scope = fci_cache->calling_scope;
       called_scope = fci_cache->called_scope;
       fci->object_ptr = fci_cache->object_ptr;
       EX(object) = fci->object_ptr;
       if (fci->object_ptr && Z_TYPE_P(fci->object_ptr) == IS_OBJECT &&
           (!EG(objects_store).object_buckets || !EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(fci->object_ptr)].valid)) {
              return FAILURE;
       }

       if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
              if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) {
                     zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
              }
              if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
                     zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
                            EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
                            EX(function_state).function->common.scope ? "::" : "",
                            EX(function_state).function->common.function_name);
              }
       }

       ZEND_VM_STACK_GROW_IF_NEEDED(fci->param_count + 1);

       for (i=0; i<fci->param_count; i++) {
              zval *param;

              if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION 
                     && (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) == 0 
                     && !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
                     && PZVAL_IS_REF(*fci->params[i])) {
                     ALLOC_ZVAL(param);
                     *param = **(fci->params[i]);
                     INIT_PZVAL(param);
                     zval_copy_ctor(param);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
                     && !PZVAL_IS_REF(*fci->params[i])) {

                     if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
                            zval *new_zval;

                            if (fci->no_separation &&
                                !ARG_MAY_BE_SENT_BY_REF(EX(function_state).function, i + 1)) {
                                   if(i) {
                                          /* hack to clean up the stack */
                                          zend_vm_stack_push_nocheck((void *) (zend_uintptr_t)i TSRMLS_CC);
                                          zend_vm_stack_clear_multiple(TSRMLS_C);
                                   }

                                   zend_error(E_WARNING, "Parameter %d to %s%s%s() expected to be a reference, value given",
                                          i+1,
                                          EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
                                          EX(function_state).function->common.scope ? "::" : "",
                                          EX(function_state).function->common.function_name);
                                   return FAILURE;
                            }

                            ALLOC_ZVAL(new_zval);
                            *new_zval = **fci->params[i];
                            zval_copy_ctor(new_zval);
                            Z_SET_REFCOUNT_P(new_zval, 1);
                            Z_DELREF_PP(fci->params[i]);
                            *fci->params[i] = new_zval;
                     }
                     Z_ADDREF_PP(fci->params[i]);
                     Z_SET_ISREF_PP(fci->params[i]);
                     param = *fci->params[i];
              } else if (*fci->params[i] != &EG(uninitialized_zval)) {
                     Z_ADDREF_PP(fci->params[i]);
                     param = *fci->params[i];
              } else {
                     ALLOC_ZVAL(param);
                     *param = **(fci->params[i]);
                     INIT_PZVAL(param);
              }
              zend_vm_stack_push_nocheck(param TSRMLS_CC);
       }

       EX(function_state).arguments = zend_vm_stack_top(TSRMLS_C);
       zend_vm_stack_push_nocheck((void*)(zend_uintptr_t)fci->param_count TSRMLS_CC);

       current_scope = EG(scope);
       EG(scope) = calling_scope;

       current_this = EG(This);

       current_called_scope = EG(called_scope);
       if (called_scope) {
              EG(called_scope) = called_scope;
       } else if (EX(function_state).function->type != ZEND_INTERNAL_FUNCTION) {
              EG(called_scope) = NULL;
       }

       if (fci->object_ptr) {
              if ((EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)) {
                     EG(This) = NULL;
              } else {
                     EG(This) = fci->object_ptr;

                     if (!PZVAL_IS_REF(EG(This))) {
                            Z_ADDREF_P(EG(This)); /* For $this pointer */
                     } else {
                            zval *this_ptr;

                            ALLOC_ZVAL(this_ptr);
                            *this_ptr = *EG(This);
                            INIT_PZVAL(this_ptr);
                            zval_copy_ctor(this_ptr);
                            EG(This) = this_ptr;
                     }
              }
       } else {
              EG(This) = NULL;
       }

       EX(prev_execute_data) = EG(current_execute_data);
       EG(current_execute_data) = &execute_data;

       if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
              calling_symbol_table = EG(active_symbol_table);
              EG(scope) = EX(function_state).function->common.scope;
              if (fci->symbol_table) {
                     EG(active_symbol_table) = fci->symbol_table;
              } else {
                     EG(active_symbol_table) = NULL;
              }

              original_return_value = EG(return_value_ptr_ptr);
              original_op_array = EG(active_op_array);
              EG(return_value_ptr_ptr) = fci->retval_ptr_ptr;
              EG(active_op_array) = (zend_op_array *) EX(function_state).function;
              original_opline_ptr = EG(opline_ptr);
              zend_execute(EG(active_op_array) TSRMLS_CC);
              if (!fci->symbol_table && EG(active_symbol_table)) {
                     if (EG(symtable_cache_ptr)>=EG(symtable_cache_limit)) {
                            zend_hash_destroy(EG(active_symbol_table));
                            FREE_HASHTABLE(EG(active_symbol_table));
                     } else {
                            /* clean before putting into the cache, since clean
                               could call dtors, which could use cached hash */
                            zend_hash_clean(EG(active_symbol_table));
                            *(++EG(symtable_cache_ptr)) = EG(active_symbol_table);
                     }
              }
              EG(active_symbol_table) = calling_symbol_table;
              EG(active_op_array) = original_op_array;
              EG(return_value_ptr_ptr)=original_return_value;
              EG(opline_ptr) = original_opline_ptr;
       } else if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
              int call_via_handler = (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
              ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
              if (EX(function_state).function->common.scope) {
                     EG(scope) = EX(function_state).function->common.scope;
              }
              ((zend_internal_function *) EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
              /*  We shouldn't fix bad extensions here,
                     because it can break proper ones (Bug #34045)
              if (!EX(function_state).function->common.return_reference)
              {
                     INIT_PZVAL(*fci->retval_ptr_ptr);
              }*/
              if (EG(exception) && fci->retval_ptr_ptr) {
                     zval_ptr_dtor(fci->retval_ptr_ptr);
                     *fci->retval_ptr_ptr = NULL;
              }

              if (call_via_handler) {
                     /* We must re-initialize function again */
                     fci_cache->initialized = 0;
              }
       } else { /* ZEND_OVERLOADED_FUNCTION */
              ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);

              /* Not sure what should be done here if it's a static method */
              if (fci->object_ptr) {
                     Z_OBJ_HT_P(fci->object_ptr)->call_method(EX(function_state).function->common.function_name, fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, fci->object_ptr, 1 TSRMLS_CC);
              } else {
                     zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
              }

              if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
                     efree(EX(function_state).function->common.function_name);
              }
              efree(EX(function_state).function);

              if (EG(exception) && fci->retval_ptr_ptr) {
                     zval_ptr_dtor(fci->retval_ptr_ptr);
                     *fci->retval_ptr_ptr = NULL;
              }
       }
       zend_vm_stack_clear_multiple(TSRMLS_C);

       if (EG(This)) {
              zval_ptr_dtor(&EG(This));
       }
       EG(called_scope) = current_called_scope;
       EG(scope) = current_scope;
       EG(This) = current_this;
       EG(current_execute_data) = EX(prev_execute_data);

       if (EG(exception)) {
              zend_throw_exception_internal(NULL TSRMLS_CC);
       }
       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_check_magic_method_implementation ( const zend_class_entry *  ce,
const zend_function fptr,
int error_type  TSRMLS_DC 
)

Definition at line 1734 of file zend_API.c.

{
       char lcname[16];
       int name_len;

       /* we don't care if the function name is longer, in fact lowercasing only
        * the beginning of the name speeds up the check process */
       name_len = strlen(fptr->common.function_name);
       zend_str_tolower_copy(lcname, fptr->common.function_name, MIN(name_len, sizeof(lcname)-1));
       lcname[sizeof(lcname)-1] = '\0'; /* zend_str_tolower_copy won't necessarily set the zero byte */

       if (name_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME)) && fptr->common.num_args != 0) {
              zend_error(error_type, "Destructor %s::%s() cannot take arguments", ce->name, ZEND_DESTRUCTOR_FUNC_NAME);
       } else if (name_len == sizeof(ZEND_CLONE_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)) && fptr->common.num_args != 0) {
              zend_error(error_type, "Method %s::%s() cannot accept any arguments", ce->name, ZEND_CLONE_FUNC_NAME);
       } else if (name_len == sizeof(ZEND_GET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME))) {
              if (fptr->common.num_args != 1) {
                     zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_GET_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_GET_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_SET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME))) {
              if (fptr->common.num_args != 2) {
                     zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_SET_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_SET_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_UNSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME))) {
              if (fptr->common.num_args != 1) {
                     zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_UNSET_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_UNSET_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_ISSET_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_ISSET_FUNC_NAME, sizeof(ZEND_ISSET_FUNC_NAME))) {
              if (fptr->common.num_args != 1) {
                     zend_error(error_type, "Method %s::%s() must take exactly 1 argument", ce->name, ZEND_ISSET_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_ISSET_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && !memcmp(lcname, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME))) {
              if (fptr->common.num_args != 2) {
                     zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_CALL_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_CALL_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME) - 1 &&
              !memcmp(lcname, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1)
       ) {
              if (fptr->common.num_args != 2) {
                     zend_error(error_type, "Method %s::%s() must take exactly 2 arguments", ce->name, ZEND_CALLSTATIC_FUNC_NAME);
              } else if (ARG_SHOULD_BE_SENT_BY_REF(fptr, 1) || ARG_SHOULD_BE_SENT_BY_REF(fptr, 2)) {
                     zend_error(error_type, "Method %s::%s() cannot take arguments by reference", ce->name, ZEND_CALLSTATIC_FUNC_NAME);
              }
       } else if (name_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 &&
              !memcmp(lcname, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && fptr->common.num_args != 0
       ) {
              zend_error(error_type, "Method %s::%s() cannot take arguments", ce->name, ZEND_TOSTRING_FUNC_NAME);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_class_implements ( zend_class_entry *class_entry  TSRMLS_DC,
int  num_interfaces,
  ... 
)

Definition at line 2236 of file zend_API.c.

{
       zend_class_entry *interface_entry;
       va_list interface_list;
       va_start(interface_list, num_interfaces);

       while (num_interfaces--) {
              interface_entry = va_arg(interface_list, zend_class_entry *);
              zend_do_implement_interface(class_entry, interface_entry TSRMLS_CC);
       }

       va_end(interface_list);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_copy_parameters_array ( int  param_count,
zval *argument_array  TSRMLS_DC 
)

Definition at line 165 of file zend_API.c.

{
       void **p;
       int arg_count;

       p = zend_vm_stack_top(TSRMLS_C) - 1;
       arg_count = (int)(zend_uintptr_t) *p;

       if (param_count>arg_count) {
              return FAILURE;
       }

       while (param_count-->0) {
              zval **param = (zval **) p-(arg_count--);
              zval_add_ref(param);
              add_next_index_zval(argument_array, *param);
       }

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_class_constant ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
zval *value  TSRMLS_DC 
)

Definition at line 3265 of file zend_API.c.

{
       return zend_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL);
}

Here is the caller graph for this function:

ZEND_API int zend_declare_class_constant_bool ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
zend_bool value  TSRMLS_DC 
)

Definition at line 3301 of file zend_API.c.

{
       zval *constant;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(constant);
       } else {
              ALLOC_ZVAL(constant);
       }
       ZVAL_BOOL(constant, value);
       INIT_PZVAL(constant);
       return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_class_constant_double ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
double value  TSRMLS_DC 
)

Definition at line 3316 of file zend_API.c.

{
       zval *constant;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(constant);
       } else {
              ALLOC_ZVAL(constant);
       }
       ZVAL_DOUBLE(constant, value);
       INIT_PZVAL(constant);
       return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_class_constant_long ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
long value  TSRMLS_DC 
)

Definition at line 3286 of file zend_API.c.

{
       zval *constant;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(constant);
       } else {
              ALLOC_ZVAL(constant);
       }
       ZVAL_LONG(constant, value);
       INIT_PZVAL(constant);
       return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_class_constant_null ( zend_class_entry *  ce,
const char *  name,
size_t name_length  TSRMLS_DC 
)

Definition at line 3271 of file zend_API.c.

{
       zval *constant;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(constant);
       } else {
              ALLOC_ZVAL(constant);
       }
       ZVAL_NULL(constant);
       INIT_PZVAL(constant);
       return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_class_constant_string ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
const char *value  TSRMLS_DC 
)

Definition at line 3347 of file zend_API.c.

{
       return zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value) TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_class_constant_stringl ( zend_class_entry *  ce,
const char *  name,
size_t  name_length,
const char *  value,
size_t value_length  TSRMLS_DC 
)

Definition at line 3331 of file zend_API.c.

{
       zval *constant;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(constant);
              ZVAL_STRINGL(constant, zend_strndup(value, value_length), value_length, 0);
       } else {
              ALLOC_ZVAL(constant);
              ZVAL_STRINGL(constant, value, value_length, 1);
       }
       INIT_PZVAL(constant);
       return zend_declare_class_constant(ce, name, name_length, constant TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property ( zend_class_entry *  ce,
char *  name,
int  name_length,
zval *  property,
int access_type  TSRMLS_DC 
)

Definition at line 3167 of file zend_API.c.

{
       return zend_declare_property_ex(ce, name, name_length, property, access_type, NULL, 0 TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property_bool ( zend_class_entry *  ce,
char *  name,
int  name_length,
long  value,
int access_type  TSRMLS_DC 
)

Definition at line 3187 of file zend_API.c.

{
       zval *property;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
       } else {
              ALLOC_ZVAL(property);
       }
       INIT_PZVAL(property);
       ZVAL_BOOL(property, value);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_property_double ( zend_class_entry *  ce,
char *  name,
int  name_length,
double  value,
int access_type  TSRMLS_DC 
)

Definition at line 3217 of file zend_API.c.

{
       zval *property;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
       } else {
              ALLOC_ZVAL(property);
       }
       INIT_PZVAL(property);
       ZVAL_DOUBLE(property, value);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_declare_property_ex ( zend_class_entry *  ce,
const char *  name,
int  name_length,
zval *  property,
int  access_type,
char *  doc_comment,
int doc_comment_len  TSRMLS_DC 
)

Definition at line 3093 of file zend_API.c.

{
       zend_property_info property_info;
       HashTable *target_symbol_table;

       if (!(access_type & ZEND_ACC_PPP_MASK)) {
              access_type |= ZEND_ACC_PUBLIC;
       }
       if (access_type & ZEND_ACC_STATIC) {
              target_symbol_table = &ce->default_static_members;
       } else {
              target_symbol_table = &ce->default_properties;
       }
       if (ce->type & ZEND_INTERNAL_CLASS) {
              switch(Z_TYPE_P(property)) {
                     case IS_ARRAY:
                     case IS_CONSTANT_ARRAY:
                     case IS_OBJECT:
                     case IS_RESOURCE:
                            zend_error(E_CORE_ERROR, "Internal zval's can't be arrays, objects or resources");
                            break;
                     default:
                            break;
              }
       }
       switch (access_type & ZEND_ACC_PPP_MASK) {
              case ZEND_ACC_PRIVATE: {
                            char *priv_name;
                            int priv_name_length;

                            zend_mangle_property_name(&priv_name, &priv_name_length, ce->name, ce->name_length, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
                            zend_hash_update(target_symbol_table, priv_name, priv_name_length+1, &property, sizeof(zval *), NULL);
                            property_info.name = priv_name;
                            property_info.name_length = priv_name_length;
                     }
                     break;
              case ZEND_ACC_PROTECTED: {
                            char *prot_name;
                            int prot_name_length;

                            zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
                            zend_hash_update(target_symbol_table, prot_name, prot_name_length+1, &property, sizeof(zval *), NULL);
                            property_info.name = prot_name;
                            property_info.name_length = prot_name_length;
                     }
                     break;
              case ZEND_ACC_PUBLIC:
                     if (ce->parent) {
                            char *prot_name;
                            int prot_name_length;

                            zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
                            zend_hash_del(target_symbol_table, prot_name, prot_name_length+1);
                            pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
                     }
                     zend_hash_update(target_symbol_table, name, name_length+1, &property, sizeof(zval *), NULL);
                     property_info.name = ce->type & ZEND_INTERNAL_CLASS ? zend_strndup(name, name_length) : estrndup(name, name_length);
                     property_info.name_length = name_length;
                     break;
       }
       property_info.flags = access_type;
       property_info.h = zend_get_hash_value(property_info.name, property_info.name_length+1);

       property_info.doc_comment = doc_comment;
       property_info.doc_comment_len = doc_comment_len;

       property_info.ce = ce;

       zend_hash_update(&ce->properties_info, name, name_length + 1, &property_info, sizeof(zend_property_info), NULL);

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property_long ( zend_class_entry *  ce,
char *  name,
int  name_length,
long  value,
int access_type  TSRMLS_DC 
)

Definition at line 3202 of file zend_API.c.

{
       zval *property;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
       } else {
              ALLOC_ZVAL(property);
       }
       INIT_PZVAL(property);
       ZVAL_LONG(property, value);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property_null ( zend_class_entry *  ce,
char *  name,
int  name_length,
int access_type  TSRMLS_DC 
)

Definition at line 3173 of file zend_API.c.

{
       zval *property;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
       } else {
              ALLOC_ZVAL(property);
       }
       INIT_ZVAL(*property);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property_string ( zend_class_entry *  ce,
char *  name,
int  name_length,
char *  value,
int access_type  TSRMLS_DC 
)

Definition at line 3232 of file zend_API.c.

{
       zval *property;
       int len = strlen(value);

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
              ZVAL_STRINGL(property, zend_strndup(value, len), len, 0);
       } else {
              ALLOC_ZVAL(property);
              ZVAL_STRINGL(property, value, len, 1);
       }
       INIT_PZVAL(property);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_declare_property_stringl ( zend_class_entry *  ce,
char *  name,
int  name_length,
char *  value,
int  value_len,
int access_type  TSRMLS_DC 
)

Definition at line 3249 of file zend_API.c.

{
       zval *property;

       if (ce->type & ZEND_INTERNAL_CLASS) {
              ALLOC_PERMANENT_ZVAL(property);
              ZVAL_STRINGL(property, zend_strndup(value, value_len), value_len, 0);
       } else {
              ALLOC_ZVAL(property);
              ZVAL_STRINGL(property, value, value_len, 1);
       }
       INIT_PZVAL(property);
       return zend_declare_property(ce, name, name_length, property, access_type TSRMLS_CC);
}

Here is the call graph for this function:

ZEND_API int zend_delete_global_variable ( char *  name,
int name_len  TSRMLS_DC 
)

Definition at line 1656 of file zend_execute_API.c.

{
       zend_execute_data *ex;
       ulong hash_value = zend_inline_hash_func(name, name_len + 1);

       if (zend_hash_quick_exists(&EG(symbol_table), name, name_len + 1, hash_value)) {
              for (ex = EG(current_execute_data); ex; ex = ex->prev_execute_data) {
                     if (ex->op_array && ex->symbol_table == &EG(symbol_table)) {
                            int i;
                            for (i = 0; i < ex->op_array->last_var; i++) {
                                   if (ex->op_array->vars[i].hash_value == hash_value &&
                                          ex->op_array->vars[i].name_len == name_len &&
                                          !memcmp(ex->op_array->vars[i].name, name, name_len)
                                   ) {
                                          ex->CVs[i] = NULL;
                                          break;
                                   }
                            }
                     }
              }
              return zend_hash_quick_del(&EG(symbol_table), name, name_len + 1, hash_value);
       }
       return FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_disable_class ( char *  class_name,
uint class_name_length  TSRMLS_DC 
)

Definition at line 2340 of file zend_API.c.

{
       zend_class_entry disabled_class;

       zend_str_tolower(class_name, class_name_length);
       if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) {
              return FAILURE;
       }
       INIT_OVERLOADED_CLASS_ENTRY_EX(disabled_class, class_name, class_name_length, disabled_class_new, NULL, NULL, NULL, NULL, NULL);
       disabled_class.create_object = display_disabled_class;
       disabled_class.name_length = class_name_length;
       zend_register_internal_class(&disabled_class TSRMLS_CC);
       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_disable_function ( char *  function_name,
uint function_name_length  TSRMLS_DC 
)

Definition at line 2314 of file zend_API.c.

{
       if (zend_hash_del(CG(function_table), function_name, function_name_length+1)==FAILURE) {
              return FAILURE;
       }
       disabled_function[0].fname = function_name;
       return zend_register_functions(NULL, disabled_function, CG(function_table), MODULE_PERSISTENT TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_fcall_info_argn ( zend_fcall_info *fci  TSRMLS_DC,
int  argc,
  ... 
)

Set arguments in the zend_fcall_info struct taking care of refcount.

If argc is 0 the arguments which are set will be cleared, else pass a variable amount of zval** arguments.

Definition at line 3042 of file zend_API.c.

{
       int ret;
       va_list argv;

       va_start(argv, argc);
       ret = zend_fcall_info_argv(fci TSRMLS_CC, argc, &argv);
       va_end(argv);

       return ret;
}

Here is the call graph for this function:

ZEND_API int zend_fcall_info_argp ( zend_fcall_info *fci  TSRMLS_DC,
int  argc,
zval ***  argv 
)

Set arguments in the zend_fcall_info struct taking care of refcount.

If argc is 0 the arguments which are set will be cleared, else pass a variable amount of zval** arguments.

Definition at line 2994 of file zend_API.c.

{
       int i;

       if (argc < 0) {
              return FAILURE;
       }

       zend_fcall_info_args_clear(fci, !argc);

       if (argc) {
              fci->param_count = argc;
              fci->params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **));

              for (i = 0; i < argc; ++i) {
                     fci->params[i] = argv[i];
              }
       }

       return SUCCESS;
}

Here is the call graph for this function:

ZEND_API int zend_fcall_info_args ( zend_fcall_info fci,
zval *args  TSRMLS_DC 
)

Set or clear the arguments in the zend_call_info struct taking care of refcount.

If args is NULL and arguments are set then those are cleared.

Definition at line 2966 of file zend_API.c.

{
       HashPosition pos;
       zval **arg, ***params;

       zend_fcall_info_args_clear(fci, !args);

       if (!args) {
              return SUCCESS;
       }

       if (Z_TYPE_P(args) != IS_ARRAY) {
              return FAILURE;
       }

       fci->param_count = zend_hash_num_elements(Z_ARRVAL_P(args));
       fci->params = params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **));

       zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(args), &pos);
       while (zend_hash_get_current_data_ex(Z_ARRVAL_P(args), (void *) &arg, &pos) == SUCCESS) {
              *params++ = arg;
              zend_hash_move_forward_ex(Z_ARRVAL_P(args), &pos);
       }

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_fcall_info_args_clear ( zend_fcall_info fci,
int  free_mem 
)

Clear argumens connected with zend_fcall_info *fci If free_mem is not zero then the params array gets free'd as well.

Definition at line 2937 of file zend_API.c.

{
       if (fci->params) {
              if (free_mem) {
                     efree(fci->params);
                     fci->params = NULL;
              }
       }
       fci->param_count = 0;
}

Here is the caller graph for this function:

ZEND_API void zend_fcall_info_args_restore ( zend_fcall_info fci,
int  param_count,
zval ***  params 
)

Free arguments connected with zend_fcall_info *fci andset back saved ones.

Definition at line 2958 of file zend_API.c.

{
       zend_fcall_info_args_clear(fci, 1);
       fci->param_count = param_count;
       fci->params = params;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_fcall_info_args_save ( zend_fcall_info fci,
int param_count,
zval ****  params 
)

Save current arguments from zend_fcall_info *fci params array will be set to NULL.

Definition at line 2949 of file zend_API.c.

{
       *param_count = fci->param_count;
       *params = fci->params;
       fci->param_count = 0;
       fci->params = NULL;
}

Here is the caller graph for this function:

ZEND_API int zend_fcall_info_argv ( zend_fcall_info *fci  TSRMLS_DC,
int  argc,
va_list *  argv 
)

Set arguments in the zend_fcall_info struct taking care of refcount.

If argc is 0 the arguments which are set will be cleared, else pass a variable amount of zval** arguments.

Definition at line 3017 of file zend_API.c.

{
       int i;
       zval **arg;

       if (argc < 0) {
              return FAILURE;
       }

       zend_fcall_info_args_clear(fci, !argc);

       if (argc) {
              fci->param_count = argc;
              fci->params = (zval ***) erealloc(fci->params, fci->param_count * sizeof(zval **));

              for (i = 0; i < argc; ++i) {
                     arg = va_arg(*argv, zval **);
                     fci->params[i] = arg;
              }
       }

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_fcall_info_call ( zend_fcall_info fci,
zend_fcall_info_cache fcc,
zval **  retval,
zval *args  TSRMLS_DC 
)

Call a function using information created by zend_fcall_info_init()/args().

If args is given then those replace the arguement info in fci is temporarily.

Definition at line 3055 of file zend_API.c.

{
       zval *retval, ***org_params = NULL;
       int result, org_count = 0;

       fci->retval_ptr_ptr = retval_ptr_ptr ? retval_ptr_ptr : &retval;
       if (args) {
              zend_fcall_info_args_save(fci, &org_count, &org_params);
              zend_fcall_info_args(fci, args TSRMLS_CC);
       }
       result = zend_call_function(fci, fcc TSRMLS_CC);

       if (!retval_ptr_ptr && retval) {
              zval_ptr_dtor(&retval);
       }
       if (args) {
              zend_fcall_info_args_restore(fci, org_count, org_params);
       }
       return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_fcall_info_init ( zval *  callable,
uint  check_flags,
zend_fcall_info fci,
zend_fcall_info_cache fcc,
char **  callable_name,
char **error  TSRMLS_DC 
)

Build zend_call_info/cache from a zval*.

Caller is responsible to provide a return value, otherwise the we will crash. fci->retval_ptr_ptr = NULL; In order to pass parameters the following members need to be set: fci->param_count = 0; fci->params = NULL; The callable_name argument may be NULL. Set check_flags to IS_CALLABLE_STRICT for every new usage!

Definition at line 2917 of file zend_API.c.

{
       if (!zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, fcc, error TSRMLS_CC)) {
              return FAILURE;
       }

       fci->size = sizeof(*fci);
       fci->function_table = fcc->calling_scope ? &fcc->calling_scope->function_table : EG(function_table);
       fci->object_ptr = fcc->object_ptr;
       fci->function_name = callable;
       fci->retval_ptr_ptr = NULL;
       fci->param_count = 0;
       fci->params = NULL;
       fci->no_separation = 1;
       fci->symbol_table = NULL;

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API ZEND_FUNCTION ( display_disabled_function  )

Definition at line 2303 of file zend_API.c.

{
       zend_error(E_WARNING, "%s() has been disabled for security reasons", get_active_function_name(TSRMLS_C));
}

Here is the call graph for this function:

ZEND_API zend_class_entry* zend_get_class_entry ( const zval *zobject  TSRMLS_DC)

Definition at line 228 of file zend_API.c.

{
       if (Z_OBJ_HT_P(zobject)->get_class_entry) {
              return Z_OBJ_HT_P(zobject)->get_class_entry(zobject TSRMLS_CC);
       } else {
              zend_error(E_ERROR, "Class entry requested for an object without PHP class");
              return NULL;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_get_module_started ( const char *  module_name)

Definition at line 2078 of file zend_API.c.

{
       zend_module_entry *module;

       return (zend_hash_find(&module_registry, module_name, strlen(module_name)+1, (void**)&module) == SUCCESS && module->module_started) ? SUCCESS : FAILURE;
}

Here is the call graph for this function:

ZEND_API const char* zend_get_module_version ( const char *  module_name)

Definition at line 3077 of file zend_API.c.

{
       char *lname;
       int name_len = strlen(module_name);
       zend_module_entry *module;

       lname = zend_str_tolower_dup(module_name, name_len);
       if (zend_hash_find(&module_registry, lname, name_len + 1, (void**)&module) == FAILURE) {
              efree(lname);
              return NULL;
       }
       efree(lname);
       return module->version;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_get_object_classname ( const zval *  object,
char **  class_name,
zend_uint *class_name_len  TSRMLS_DC 
)

Definition at line 240 of file zend_API.c.

{
       if (Z_OBJ_HT_P(object)->get_class_name == NULL ||
              Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) {
              zend_class_entry *ce = Z_OBJCE_P(object);

              *class_name = ce->name;
              *class_name_len = ce->name_length;
              return 1;
       }
       return 0;
}

Here is the caller graph for this function:

ZEND_API int zend_get_parameters ( int  ht,
int  param_count,
  ... 
)

Definition at line 40 of file zend_API.c.

{
       void **p;
       int arg_count;
       va_list ptr;
       zval **param, *param_ptr;
       TSRMLS_FETCH();

       p = zend_vm_stack_top(TSRMLS_C) - 1;
       arg_count = (int)(zend_uintptr_t) *p;

       if (param_count>arg_count) {
              return FAILURE;
       }

       va_start(ptr, param_count);

       while (param_count-->0) {
              param = va_arg(ptr, zval **);
              param_ptr = *(p-arg_count);
              if (!PZVAL_IS_REF(param_ptr) && Z_REFCOUNT_P(param_ptr) > 1) {
                     zval *new_tmp;

                     ALLOC_ZVAL(new_tmp);
                     *new_tmp = *param_ptr;
                     zval_copy_ctor(new_tmp);
                     INIT_PZVAL(new_tmp);
                     param_ptr = new_tmp;
                     Z_DELREF_P((zval *) *(p-arg_count));
                     *(p-arg_count) = param_ptr;
              }
              *param = param_ptr;
              arg_count--;
       }
       va_end(ptr);

       return SUCCESS;
}

Here is the call graph for this function:

Definition at line 116 of file zend_API.c.

{
       void **p;
       int arg_count;
       va_list ptr;
       zval ***param;
       TSRMLS_FETCH();

       p = zend_vm_stack_top(TSRMLS_C) - 1;
       arg_count = (int)(zend_uintptr_t) *p;

       if (param_count>arg_count) {
              return FAILURE;
       }

       va_start(ptr, param_count);
       while (param_count-->0) {
              param = va_arg(ptr, zval ***);
              *param = (zval **) p-(arg_count--);
       }
       va_end(ptr);

       return SUCCESS;
}

Here is the call graph for this function:

Definition at line 197 of file zend_API.c.

{
       switch(type) {
              case IS_BOOL:
                     return "boolean";
              case IS_LONG:
                     return "integer";
              case IS_DOUBLE:
                     return "double";
              case IS_STRING:
                     return "string";
              case IS_OBJECT:
                     return "object";
              case IS_RESOURCE:
                     return "resource";
              case IS_NULL:
                     return "null";
              case IS_ARRAY:
                     return "array";
              default:
                     return "unknown";
       }
}

Here is the caller graph for this function:

ZEND_API zend_bool zend_is_callable ( zval *  callable,
uint  check_flags,
char **callable_name  TSRMLS_DC 
)

Definition at line 2884 of file zend_API.c.

{
       return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL, NULL TSRMLS_CC);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API zend_bool zend_is_callable_ex ( zval *  callable,
zval *  object_ptr,
uint  check_flags,
char **  callable_name,
int callable_name_len,
zend_fcall_info_cache fcc,
char **error  TSRMLS_DC 
)

Definition at line 2683 of file zend_API.c.

{
       zend_bool ret;
       int callable_name_len_local;
       zend_fcall_info_cache fcc_local;

       if (callable_name) {
              *callable_name = NULL;
       }
       if (callable_name_len == NULL) {
              callable_name_len = &callable_name_len_local;
       }
       if (fcc == NULL) {
              fcc = &fcc_local;
       }
       if (error) {
              *error = NULL;
       }
       
       fcc->initialized = 0;
       fcc->calling_scope = NULL;
       fcc->called_scope = NULL;
       fcc->function_handler = NULL;
       fcc->calling_scope = NULL;
       fcc->object_ptr = NULL;

       if (object_ptr && Z_TYPE_P(object_ptr) != IS_OBJECT) {
              object_ptr = NULL;
       }
       if (object_ptr &&
           (!EG(objects_store).object_buckets || 
            !EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(object_ptr)].valid)) {
              return 0;
       }

       switch (Z_TYPE_P(callable)) {
              case IS_STRING:
                     if (object_ptr) {
                            fcc->object_ptr = object_ptr;
                            fcc->calling_scope = Z_OBJCE_P(object_ptr);
                            if (callable_name) {
                                   char *ptr;

                                   *callable_name_len = fcc->calling_scope->name_length + Z_STRLEN_P(callable) + sizeof("::") - 1;
                                   ptr = *callable_name = emalloc(*callable_name_len + 1);
                                   memcpy(ptr, fcc->calling_scope->name, fcc->calling_scope->name_length);
                                   ptr += fcc->calling_scope->name_length;
                                   memcpy(ptr, "::", sizeof("::") - 1);
                                   ptr += sizeof("::") - 1;
                                   memcpy(ptr, Z_STRVAL_P(callable), Z_STRLEN_P(callable) + 1);
                            }
                     } else if (callable_name) {
                            *callable_name = estrndup(Z_STRVAL_P(callable), Z_STRLEN_P(callable));
                            *callable_name_len = Z_STRLEN_P(callable);
                     }
                     if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
                            fcc->called_scope = fcc->calling_scope;
                            return 1;
                     }

                     ret = zend_is_callable_check_func(check_flags, callable, fcc, 0, error TSRMLS_CC);
                     if (fcc == &fcc_local &&
                         fcc->function_handler &&
                            ((fcc->function_handler->type == ZEND_INTERNAL_FUNCTION &&
                           (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER)) ||
                          fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
                          fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
                            if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
                                   efree(fcc->function_handler->common.function_name);
                            }
                            efree(fcc->function_handler);
                     }
                     return ret;

              case IS_ARRAY:
                     {
                            zval **method = NULL;
                            zval **obj = NULL;
                            int strict_class = 0;

                            if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) {
                                   zend_hash_index_find(Z_ARRVAL_P(callable), 0, (void **) &obj);
                                   zend_hash_index_find(Z_ARRVAL_P(callable), 1, (void **) &method);
                            }
                            if (obj && method &&
                                   (Z_TYPE_PP(obj) == IS_OBJECT ||
                                   Z_TYPE_PP(obj) == IS_STRING) &&
                                   Z_TYPE_PP(method) == IS_STRING) {

                                   if (Z_TYPE_PP(obj) == IS_STRING) {
                                          if (callable_name) {
                                                 char *ptr;

                                                 *callable_name_len = Z_STRLEN_PP(obj) + Z_STRLEN_PP(method) + sizeof("::") - 1;
                                                 ptr = *callable_name = emalloc(*callable_name_len + 1);
                                                 memcpy(ptr, Z_STRVAL_PP(obj), Z_STRLEN_PP(obj));
                                                 ptr += Z_STRLEN_PP(obj);
                                                 memcpy(ptr, "::", sizeof("::") - 1);
                                                 ptr += sizeof("::") - 1;
                                                 memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
                                          }

                                          if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
                                                 return 1;
                                          }

                                          if (!zend_is_callable_check_class(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), fcc, &strict_class, error TSRMLS_CC)) {
                                                 return 0;
                                          }

                                   } else {
                                          if (!EG(objects_store).object_buckets || 
                                              !EG(objects_store).object_buckets[Z_OBJ_HANDLE_PP(obj)].valid) {
                                                 return 0;
                                          }

                                          fcc->calling_scope = Z_OBJCE_PP(obj); /* TBFixed: what if it's overloaded? */

                                          fcc->object_ptr = *obj;

                                          if (callable_name) {
                                                 char *ptr;

                                                 *callable_name_len = fcc->calling_scope->name_length + Z_STRLEN_PP(method) + sizeof("::") - 1;
                                                 ptr = *callable_name = emalloc(*callable_name_len + 1);
                                                 memcpy(ptr, fcc->calling_scope->name, fcc->calling_scope->name_length);
                                                 ptr += fcc->calling_scope->name_length;
                                                 memcpy(ptr, "::", sizeof("::") - 1);
                                                 ptr += sizeof("::") - 1;
                                                 memcpy(ptr, Z_STRVAL_PP(method), Z_STRLEN_PP(method) + 1);
                                          }

                                          if (check_flags & IS_CALLABLE_CHECK_SYNTAX_ONLY) {
                                                 fcc->called_scope = fcc->calling_scope;
                                                 return 1;
                                          }
                                   }

                                   ret = zend_is_callable_check_func(check_flags, *method, fcc, strict_class, error TSRMLS_CC);
                                   if (fcc == &fcc_local &&
                                       fcc->function_handler &&
                                          ((fcc->function_handler->type == ZEND_INTERNAL_FUNCTION &&
                                         (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER)) ||
                                        fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
                                        fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
                                          if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
                                                 efree(fcc->function_handler->common.function_name);
                                          }
                                          efree(fcc->function_handler);
                                   }
                                   return ret;

                            } else {
                                   if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) {
                                          if (!obj || (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT)) {
                                                 if (error) zend_spprintf(error, 0, "first array member is not a valid class name or object");
                                          } else {
                                                 if (error) zend_spprintf(error, 0, "second array member is not a valid method");
                                          }
                                   } else {
                                          if (error) zend_spprintf(error, 0, "array must have exactly two members");
                                   }
                                   if (callable_name) {
                                          *callable_name = estrndup("Array", sizeof("Array")-1);
                                          *callable_name_len = sizeof("Array") - 1;
                                   }
                            }
                     }
                     return 0;

              case IS_OBJECT:
                     if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(callable, &fcc->calling_scope, &fcc->function_handler, &fcc->object_ptr TSRMLS_CC) == SUCCESS) {
                            fcc->called_scope = fcc->calling_scope;
                            if (callable_name) {
                                   zend_class_entry *ce = Z_OBJCE_P(callable); /* TBFixed: what if it's overloaded? */

                                   *callable_name_len = ce->name_length + sizeof("::__invoke") - 1;
                                   *callable_name = emalloc(*callable_name_len + 1);
                                   memcpy(*callable_name, ce->name, ce->name_length);
                                   memcpy((*callable_name) + ce->name_length, "::__invoke", sizeof("::__invoke"));
                            }                                                              
                            return 1;
                     }
                     /* break missing intentionally */

              default:
                     if (callable_name) {
                            zval expr_copy;
                            int use_copy;

                            zend_make_printable_zval(callable, &expr_copy, &use_copy);
                            *callable_name = estrndup(Z_STRVAL(expr_copy), Z_STRLEN(expr_copy));
                            *callable_name_len = Z_STRLEN(expr_copy);
                            zval_dtor(&expr_copy);
                     }
                     if (error) zend_spprintf(error, 0, "no array or string given");
                     return 0;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API zend_bool zend_make_callable ( zval *  callable,
char **callable_name  TSRMLS_DC 
)

Definition at line 2890 of file zend_API.c.

{
       zend_fcall_info_cache fcc;

       if (zend_is_callable_ex(callable, NULL, IS_CALLABLE_STRICT, callable_name, NULL, &fcc, NULL TSRMLS_CC)) {
              if (Z_TYPE_P(callable) == IS_STRING && fcc.calling_scope) {
                     zval_dtor(callable);
                     array_init(callable);
                     add_next_index_string(callable, fcc.calling_scope->name, 1);
                     add_next_index_string(callable, fcc.function_handler->common.function_name, 1);
              }
              if (fcc.function_handler &&
                     ((fcc.function_handler->type == ZEND_INTERNAL_FUNCTION &&
                    (fcc.function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER)) ||
                   fcc.function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
                   fcc.function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
                     if (fcc.function_handler->type != ZEND_OVERLOADED_FUNCTION) {
                            efree(fcc.function_handler->common.function_name);
                     }
                     efree(fcc.function_handler);
              }
              return 1;
       }
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_merge_properties ( zval *  obj,
HashTable properties,
int destroy_ht  TSRMLS_DC 
)

Definition at line 985 of file zend_API.c.

{
       zend_object_handlers *obj_ht = Z_OBJ_HT_P(obj);
       zend_class_entry *old_scope = EG(scope);

       EG(scope) = Z_OBJCE_P(obj);
       zend_hash_apply_with_arguments(properties TSRMLS_CC, (apply_func_args_t)zend_merge_property, 2, obj, obj_ht);
       EG(scope) = old_scope;

       if (destroy_ht) {
              zend_hash_destroy(properties);
              FREE_HASHTABLE(properties);
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2181 of file zend_API.c.

{
       return ++module_count;
}

Here is the caller graph for this function:

ZEND_API int zend_parse_method_parameters ( int num_args  TSRMLS_DC,
zval *  this_ptr,
char *  type_spec,
  ... 
)

Definition at line 878 of file zend_API.c.

{
       va_list va;
       int retval;
       char *p = type_spec;
       zval **object;
       zend_class_entry *ce;

       if (!this_ptr) {
              RETURN_IF_ZERO_ARGS(num_args, p, 0);

              va_start(va, type_spec);
              retval = zend_parse_va_args(num_args, type_spec, &va, 0 TSRMLS_CC);
              va_end(va);
       } else {
              p++;
              RETURN_IF_ZERO_ARGS(num_args, p, 0);

              va_start(va, type_spec);

              object = va_arg(va, zval **);
              ce = va_arg(va, zend_class_entry *);
              *object = this_ptr;

              if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) {
                     zend_error(E_CORE_ERROR, "%s::%s() must be derived from %s::%s",
                            ce->name, get_active_function_name(TSRMLS_C), Z_OBJCE_P(this_ptr)->name, get_active_function_name(TSRMLS_C));
              }

              retval = zend_parse_va_args(num_args, p, &va, 0 TSRMLS_CC);
              va_end(va);
       }
       return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_parse_method_parameters_ex ( int  flags,
int num_args  TSRMLS_DC,
zval *  this_ptr,
char *  type_spec,
  ... 
)

Definition at line 914 of file zend_API.c.

{
       va_list va;
       int retval;
       char *p = type_spec;
       zval **object;
       zend_class_entry *ce;
       int quiet = flags & ZEND_PARSE_PARAMS_QUIET;

       if (!this_ptr) {
              RETURN_IF_ZERO_ARGS(num_args, p, quiet);

              va_start(va, type_spec);
              retval = zend_parse_va_args(num_args, type_spec, &va, flags TSRMLS_CC);
              va_end(va);
       } else {
              p++;
              RETURN_IF_ZERO_ARGS(num_args, p, quiet);

              va_start(va, type_spec);

              object = va_arg(va, zval **);
              ce = va_arg(va, zend_class_entry *);
              *object = this_ptr;

              if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) {
                     if (!quiet) {
                            zend_error(E_CORE_ERROR, "%s::%s() must be derived from %s::%s",
                                   ce->name, get_active_function_name(TSRMLS_C), Z_OBJCE_P(this_ptr)->name, get_active_function_name(TSRMLS_C));
                     }
                     va_end(va);
                     return FAILURE;
              }

              retval = zend_parse_va_args(num_args, p, &va, flags TSRMLS_CC);
              va_end(va);
       }
       return retval;
}

Here is the call graph for this function:

ZEND_API int zend_parse_parameters ( int num_args  TSRMLS_DC,
char *  type_spec,
  ... 
)

Definition at line 863 of file zend_API.c.

{
       va_list va;
       int retval;

       RETURN_IF_ZERO_ARGS(num_args, type_spec, 0);

       va_start(va, type_spec);
       retval = zend_parse_va_args(num_args, type_spec, &va, 0 TSRMLS_CC);
       va_end(va);

       return retval;
}

Here is the call graph for this function:

ZEND_API int zend_parse_parameters_ex ( int  flags,
int num_args  TSRMLS_DC,
char *  type_spec,
  ... 
)

Definition at line 848 of file zend_API.c.

{
       va_list va;
       int retval;

       RETURN_IF_ZERO_ARGS(num_args, type_spec, flags & ZEND_PARSE_PARAMS_QUIET);

       va_start(va, type_spec);
       retval = zend_parse_va_args(num_args, type_spec, &va, flags TSRMLS_CC);
       va_end(va);

       return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API zval* zend_read_property ( zend_class_entry *  scope,
zval *  object,
char *  name,
int  name_length,
zend_bool silent  TSRMLS_DC 
)

Definition at line 3556 of file zend_API.c.

{
       zval *property, *value;
       zend_class_entry *old_scope = EG(scope);

       EG(scope) = scope;

       if (!Z_OBJ_HT_P(object)->read_property) {
              char *class_name;
              zend_uint class_name_len;

              zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
              zend_error(E_CORE_ERROR, "Property %s of class %s cannot be read", name, class_name);
       }

       MAKE_STD_ZVAL(property);
       ZVAL_STRINGL(property, name, name_length, 1);
       value = Z_OBJ_HT_P(object)->read_property(object, property, silent?BP_VAR_IS:BP_VAR_R TSRMLS_CC);
       zval_ptr_dtor(&property);

       EG(scope) = old_scope;
       return value;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API zval* zend_read_static_property ( zend_class_entry *  scope,
char *  name,
int  name_length,
zend_bool silent  TSRMLS_DC 
)

Definition at line 3581 of file zend_API.c.

{
       zval **property;
       zend_class_entry *old_scope = EG(scope);

       EG(scope) = scope;
       property = zend_std_get_static_property(scope, name, name_length, silent TSRMLS_CC);
       EG(scope) = old_scope;

       return property?*property:NULL;
}

Here is the call graph for this function:

Definition at line 1682 of file zend_execute_API.c.

{
       zend_uint i;
       zend_execute_data *ex;

       if (!EG(active_symbol_table)) {
              
              /* Search for last called user function */
              ex = EG(current_execute_data);
              while (ex && !ex->op_array) {
                     ex = ex->prev_execute_data;
              }
              if (ex && ex->symbol_table) {
                     EG(active_symbol_table) = ex->symbol_table;
                     return;
              }

              if (ex && ex->op_array) {
                     if (EG(symtable_cache_ptr)>=EG(symtable_cache)) {
                            /*printf("Cache hit!  Reusing %x\n", symtable_cache[symtable_cache_ptr]);*/
                            EG(active_symbol_table) = *(EG(symtable_cache_ptr)--);
                     } else {
                            ALLOC_HASHTABLE(EG(active_symbol_table));
                            zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
                            /*printf("Cache miss!  Initialized %x\n", EG(active_symbol_table));*/
                     }
                     ex->symbol_table = EG(active_symbol_table);

                     if (ex->op_array->this_var != -1 &&
                         !ex->CVs[ex->op_array->this_var] &&
                         EG(This)) {
                            ex->CVs[ex->op_array->this_var] = (zval**)ex->CVs + ex->op_array->last_var + ex->op_array->this_var;
                            *ex->CVs[ex->op_array->this_var] = EG(This);
                     }
                     for (i = 0; i < ex->op_array->last_var; i++) {
                            if (ex->CVs[i]) {
                                   zend_hash_quick_update(EG(active_symbol_table),
                                          ex->op_array->vars[i].name,
                                          ex->op_array->vars[i].name_len + 1,
                                          ex->op_array->vars[i].hash_value,
                                          (void**)ex->CVs[i],
                                          sizeof(zval*),
                                          (void**)&ex->CVs[i]);
                            }
                     }
              }
       }
}

Here is the caller graph for this function:

ZEND_API int zend_register_class_alias_ex ( const char *  name,
int  name_len,
zend_class_entry *ce  TSRMLS_DC 
)

Definition at line 2265 of file zend_API.c.

{
       char *lcname = zend_str_tolower_dup(name, name_len);
       int ret;

       ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, sizeof(zend_class_entry *), NULL);
       efree(lcname);
       if (ret == SUCCESS) {
              ce->refcount++;
       }
       return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_register_functions ( zend_class_entry *  scope,
const zend_function_entry functions,
HashTable function_table,
int type  TSRMLS_DC 
)

Definition at line 1796 of file zend_API.c.

{
       const zend_function_entry *ptr = functions;
       zend_function function, *reg_function;
       zend_internal_function *internal_function = (zend_internal_function *)&function;
       int count=0, unload=0;
       HashTable *target_function_table = function_table;
       int error_type;
       zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL, *__tostring = NULL;
       char *lowercase_name;
       int fname_len;
       char *lc_class_name = NULL;
       int class_name_len = 0;

       if (type==MODULE_PERSISTENT) {
              error_type = E_CORE_WARNING;
       } else {
              error_type = E_WARNING;
       }

       if (!target_function_table) {
              target_function_table = CG(function_table);
       }
       internal_function->type = ZEND_INTERNAL_FUNCTION;
       internal_function->module = EG(current_module);

       if (scope) {
              class_name_len = strlen(scope->name);
              if ((lc_class_name = zend_memrchr(scope->name, '\\', class_name_len))) {
                     ++lc_class_name;
                     class_name_len -= (lc_class_name - scope->name);
                     lc_class_name = zend_str_tolower_dup(lc_class_name, class_name_len);
              } else {
                     lc_class_name = zend_str_tolower_dup(scope->name, class_name_len);
              }
       }

       while (ptr->fname) {
              internal_function->handler = ptr->handler;
              internal_function->function_name = (char*)ptr->fname;
              internal_function->scope = scope;
              internal_function->prototype = NULL;
              if (ptr->arg_info) {
                     internal_function->arg_info = (zend_arg_info*)ptr->arg_info+1;
                     internal_function->num_args = ptr->num_args;
                     /* Currently you cannot denote that the function can accept less arguments than num_args */
                     if (ptr->arg_info[0].required_num_args == -1) {
                            internal_function->required_num_args = ptr->num_args;
                     } else {
                            internal_function->required_num_args = ptr->arg_info[0].required_num_args;
                     }
                     internal_function->pass_rest_by_reference = ptr->arg_info[0].pass_by_reference;
                     internal_function->return_reference = ptr->arg_info[0].return_reference;
              } else {
                     internal_function->arg_info = NULL;
                     internal_function->num_args = 0;
                     internal_function->required_num_args = 0;
                     internal_function->pass_rest_by_reference = 0;
                     internal_function->return_reference = 0;
              }
              if (ptr->flags) {
                     if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
                            if (ptr->flags != ZEND_ACC_DEPRECATED || scope) {
                                   zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
                            }
                            internal_function->fn_flags = ZEND_ACC_PUBLIC | ptr->flags;
                     } else {
                            internal_function->fn_flags = ptr->flags;
                     }
              } else {
                     internal_function->fn_flags = ZEND_ACC_PUBLIC;
              }
              if (ptr->flags & ZEND_ACC_ABSTRACT) {
                     if (scope) {
                            /* This is a class that must be abstract itself. Here we set the check info. */
                            scope->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
                            if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
                                   /* Since the class is not an interface it needs to be declared as a abstract class. */
                                   /* Since here we are handling internal functions only we can add the keyword flag. */
                                   /* This time we set the flag for the keyword 'abstract'. */
                                   scope->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
                            }
                     }
                     if (ptr->flags & ZEND_ACC_STATIC && (!scope || !(scope->ce_flags & ZEND_ACC_INTERFACE))) {
                            zend_error(error_type, "Static function %s%s%s() cannot be abstract", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
                     }
              } else {
                     if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) {
                            efree(lc_class_name);
                            zend_error(error_type, "Interface %s cannot contain non abstract method %s()", scope->name, ptr->fname);
                            return FAILURE;
                     }
                     if (!internal_function->handler) {
                            if (scope) {
                                   efree(lc_class_name);
                            }
                            zend_error(error_type, "Method %s%s%s() cannot be a NULL function", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
                            zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
                            return FAILURE;
                     }
              }
              fname_len = strlen(ptr->fname);
              lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
              if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)&reg_function) == FAILURE) {
                     unload=1;
                     efree(lowercase_name);
                     break;
              }
              if (scope) {
                     /* Look for ctor, dtor, clone
                      * If it's an old-style constructor, store it only if we don't have
                      * a constructor already.
                      */
                     if ((fname_len == class_name_len) && !memcmp(lowercase_name, lc_class_name, class_name_len+1) && !ctor) {
                            ctor = reg_function;
                     } else if ((fname_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME))) {
                            ctor = reg_function;
                     } else if ((fname_len == sizeof(ZEND_DESTRUCTOR_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_DESTRUCTOR_FUNC_NAME, sizeof(ZEND_DESTRUCTOR_FUNC_NAME))) {
                            dtor = reg_function;
                            if (internal_function->num_args) {
                                   zend_error(error_type, "Destructor %s::%s() cannot take arguments", scope->name, ptr->fname);
                            }
                     } else if ((fname_len == sizeof(ZEND_CLONE_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME))) {
                            clone = reg_function;
                     } else if ((fname_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME))) {
                            __call = reg_function;
                     } else if ((fname_len == sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME))) {
                            __callstatic = reg_function;
                     } else if ((fname_len == sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME))) {
                            __tostring = reg_function;
                     } else if ((fname_len == sizeof(ZEND_GET_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_GET_FUNC_NAME, sizeof(ZEND_GET_FUNC_NAME))) {
                            __get = reg_function;
                     } else if ((fname_len == sizeof(ZEND_SET_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_SET_FUNC_NAME, sizeof(ZEND_SET_FUNC_NAME))) {
                            __set = reg_function;
                     } else if ((fname_len == sizeof(ZEND_UNSET_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_UNSET_FUNC_NAME, sizeof(ZEND_UNSET_FUNC_NAME))) {
                            __unset = reg_function;
                     } else if ((fname_len == sizeof(