Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Functions | Variables
zend.h File Reference
#include <zend_config.h>
#include <stdio.h>
#include "zend_errors.h"
#include "zend_alloc.h"
#include "zend_types.h"
#include "zend_hash.h"
#include "zend_ts_hash.h"
#include "zend_llist.h"
#include "zend_object_handlers.h"
#include "zend_iterators.h"
#include "zend_stream.h"
#include "zend_gc.h"
#include "zend_operators.h"
#include "zend_variables.h"

Go to the source code of this file.

Classes

struct  _zend_guard
struct  _zend_object
union  _zvalue_value
struct  _zval_struct
struct  _zend_class_entry
struct  _zend_utility_functions
struct  _zend_utility_values
struct  zend_error_handling
struct  _zvalue_value.str

Defines

#define ZEND_VERSION   "2.3.0"
#define ZEND_ENGINE_2
#define BEGIN_EXTERN_C()
#define END_EXTERN_C()
#define ZEND_PATHS_SEPARATOR   ':'
#define EMPTY_SWITCH_DEFAULT_CASE()
#define DL_HANDLE   void *
#define ZEND_EXTENSIONS_SUPPORT   0
#define ZEND_GCC_VERSION   0
#define ZEND_ATTRIBUTE_MALLOC
#define ZEND_ATTRIBUTE_FORMAT(type, idx, first)
#define ZEND_ATTRIBUTE_PTR_FORMAT(type, idx, first)
#define ZEND_ATTRIBUTE_DEPRECATED
#define ZEND_FASTCALL
#define __restrict__
#define restrict   __restrict__
#define ALLOCA_FLAG(name)
#define SET_ALLOCA_FLAG(name)
#define do_alloca(p, use_heap)   emalloc(p)
#define free_alloca(p, use_heap)   efree(p)
#define ZEND_FILE_LINE_D
#define ZEND_FILE_LINE_DC
#define ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_ORIG_DC
#define ZEND_FILE_LINE_RELAY_C
#define ZEND_FILE_LINE_RELAY_CC
#define ZEND_FILE_LINE_C
#define ZEND_FILE_LINE_CC
#define ZEND_FILE_LINE_EMPTY_C
#define ZEND_FILE_LINE_EMPTY_CC
#define ZEND_FILE_LINE_ORIG_RELAY_C
#define ZEND_FILE_LINE_ORIG_RELAY_CC
#define ZTS_V   0
#define MAX_LENGTH_OF_DOUBLE   32
#define SUCCESS   0
#define FAILURE   -1 /* this MUST stay a negative number, or it may affect functions! */
#define INTERNAL_FUNCTION_PARAMETERS   int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU   ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC
#define zend_error_noreturn   zend_error
#define Z_REFCOUNT_PP(ppz)   Z_REFCOUNT_P(*(ppz))
#define Z_SET_REFCOUNT_PP(ppz, rc)   Z_SET_REFCOUNT_P(*(ppz), rc)
#define Z_ADDREF_PP(ppz)   Z_ADDREF_P(*(ppz))
#define Z_DELREF_PP(ppz)   Z_DELREF_P(*(ppz))
#define Z_ISREF_PP(ppz)   Z_ISREF_P(*(ppz))
#define Z_SET_ISREF_PP(ppz)   Z_SET_ISREF_P(*(ppz))
#define Z_UNSET_ISREF_PP(ppz)   Z_UNSET_ISREF_P(*(ppz))
#define Z_SET_ISREF_TO_PP(ppz, isref)   Z_SET_ISREF_TO_P(*(ppz), isref)
#define Z_REFCOUNT_P(pz)   zval_refcount_p(pz)
#define Z_SET_REFCOUNT_P(pz, rc)   zval_set_refcount_p(pz, rc)
#define Z_ADDREF_P(pz)   zval_addref_p(pz)
#define Z_DELREF_P(pz)   zval_delref_p(pz)
#define Z_ISREF_P(pz)   zval_isref_p(pz)
#define Z_SET_ISREF_P(pz)   zval_set_isref_p(pz)
#define Z_UNSET_ISREF_P(pz)   zval_unset_isref_p(pz)
#define Z_SET_ISREF_TO_P(pz, isref)   zval_set_isref_to_p(pz, isref)
#define Z_REFCOUNT(z)   Z_REFCOUNT_P(&(z))
#define Z_SET_REFCOUNT(z, rc)   Z_SET_REFCOUNT_P(&(z), rc)
#define Z_ADDREF(z)   Z_ADDREF_P(&(z))
#define Z_DELREF(z)   Z_DELREF_P(&(z))
#define Z_ISREF(z)   Z_ISREF_P(&(z))
#define Z_SET_ISREF(z)   Z_SET_ISREF_P(&(z))
#define Z_UNSET_ISREF(z)   Z_UNSET_ISREF_P(&(z))
#define Z_SET_ISREF_TO(z, isref)   Z_SET_ISREF_TO_P(&(z), isref)
#define zend_always_inline   inline
#define EXPECTED(condition)   (condition)
#define UNEXPECTED(condition)   (condition)
#define MAX(a, b)   (((a)>(b))?(a):(b))
#define MIN(a, b)   (((a)<(b))?(a):(b))
#define ZEND_STRL(str)   (str), (sizeof(str)-1)
#define ZEND_STRS(str)   (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n)   ((n) ? (((n)>0) ? 1 : -1) : 0)
#define ZEND_TRUTH(x)   ((x) ? 1 : 0)
#define ZEND_LOG_XOR(a, b)   (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
#define IS_NULL   0
#define IS_LONG   1
#define IS_DOUBLE   2
#define IS_BOOL   3
#define IS_ARRAY   4
#define IS_OBJECT   5
#define IS_STRING   6
#define IS_RESOURCE   7
#define IS_CONSTANT   8
#define IS_CONSTANT_ARRAY   9
#define IS_CONSTANT_TYPE_MASK   0x0f
#define IS_CONSTANT_UNQUALIFIED   0x10
#define IS_CONSTANT_INDEX   0x80
#define IS_LEXICAL_VAR   0x20
#define IS_LEXICAL_REF   0x40
#define OE_IS_ARRAY   (1<<0)
#define OE_IS_OBJECT   (1<<1)
#define OE_IS_METHOD   (1<<2)
#define zend_bailout()   _zend_bailout(__FILE__, __LINE__)
#define SETJMP(a)   setjmp(a)
#define LONGJMP(a, b)   longjmp(a, b)
#define JMP_BUF   jmp_buf
#define zend_try
#define zend_catch
#define zend_end_try()
#define zend_first_try   EG(bailout)=NULL; zend_try
#define Z_DBG(expr)
#define STR_FREE(ptr)   if (ptr) { efree(ptr); }
#define STR_FREE_REL(ptr)   if (ptr) { efree_rel(ptr); }
#define STR_EMPTY_ALLOC()   estrndup("", sizeof("")-1)
#define STR_REALLOC(ptr, size)   ptr = (char *) erealloc(ptr, size);
#define ZEND_WRITE(str, str_len)   zend_write((str), (str_len))
#define ZEND_WRITE_EX(str, str_len)   write_func((str), (str_len))
#define ZEND_PUTS(str)   zend_write((str), strlen((str)))
#define ZEND_PUTS_EX(str)   write_func((str), strlen((str)))
#define ZEND_PUTC(c)   zend_write(&(c), 1), (c)
#define ZEND_STANDARD_CLASS_DEF_PTR   zend_standard_class_def
#define ZEND_UV(name)   (zend_uv.name)
#define HANDLE_BLOCK_INTERRUPTIONS()   if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS()   if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
#define ZMSG_FAILED_INCLUDE_FOPEN   1L
#define ZMSG_FAILED_REQUIRE_FOPEN   2L
#define ZMSG_FAILED_HIGHLIGHT_FOPEN   3L
#define ZMSG_MEMORY_LEAK_DETECTED   4L
#define ZMSG_MEMORY_LEAK_REPEATED   5L
#define ZMSG_LOG_SCRIPT_NAME   6L
#define ZMSG_MEMORY_LEAKS_GRAND_TOTAL   7L
#define INIT_PZVAL(z)
#define INIT_ZVAL(z)   z = zval_used_for_init;
#define ALLOC_INIT_ZVAL(zp)
#define MAKE_STD_ZVAL(zv)
#define PZVAL_IS_REF(z)   Z_ISREF_P(z)
#define SEPARATE_ZVAL(ppzv)
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv)
#define SEPARATE_ZVAL_TO_MAKE_IS_REF(ppzv)
#define COPY_PZVAL_TO_ZVAL(zv, pzv)
#define MAKE_COPY_ZVAL(ppzv, pzv)
#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy)
#define SEPARATE_ARG_IF_REF(varptr)
#define READY_TO_DESTROY(zv)
#define ZEND_MAX_RESERVED_RESOURCES   4
#define DEBUG_BACKTRACE_PROVIDE_OBJECT   (1<<0)
#define DEBUG_BACKTRACE_IGNORE_ARGS   (1<<1)

Typedefs

typedef struct _zval_struct
typedef struct _zend_class_entry
typedef struct _zend_guard zend_guard
typedef struct _zend_object zend_object
typedef union _zvalue_value zvalue_value
typedef struct _zend_serialize_data
typedef struct _zend_unserialize_data
typedef struct
_zend_utility_functions 
zend_utility_functions
typedef struct _zend_utility_values zend_utility_values
typedef int(* zend_write_func_t )(const char *str, uint str_length)

Enumerations

enum  zend_error_handling_t { EH_NORMAL = 0, EH_SUPPRESS, EH_THROW }

Functions

char * alloca ()
static zend_always_inline zend_uint zval_refcount_p (zval *pz)
static zend_always_inline zend_uint zval_set_refcount_p (zval *pz, zend_uint rc)
static zend_always_inline zend_uint zval_addref_p (zval *pz)
static zend_always_inline zend_uint zval_delref_p (zval *pz)
static zend_always_inline zend_bool zval_isref_p (zval *pz)
static zend_always_inline zend_bool zval_set_isref_p (zval *pz)
static zend_always_inline zend_bool zval_unset_isref_p (zval *pz)
static zend_always_inline zend_bool zval_set_isref_to_p (zval *pz, zend_bool isref)
int zend_startup (zend_utility_functions *utility_functions, char **extensions TSRMLS_DC)
void zend_shutdown (TSRMLS_D)
void zend_register_standard_ini_entries (TSRMLS_D)
void zend_post_startup (TSRMLS_D)
void zend_set_utility_values (zend_utility_values *utility_values)
ZEND_API void _zend_bailout (char *filename, uint lineno)
ZEND_API char * get_zend_version (void)
ZEND_API void zend_make_printable_zval (zval *expr, zval *expr_copy, int *use_copy)
ZEND_API int zend_print_zval (zval *expr, int indent)
ZEND_API int zend_print_zval_ex (zend_write_func_t write_func, zval *expr, int indent)
ZEND_API void zend_print_zval_r (zval *expr, int indent TSRMLS_DC)
ZEND_API void zend_print_flat_zval_r (zval *expr TSRMLS_DC)
ZEND_API void zend_print_zval_r_ex (zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC)
ZEND_API void zend_output_debug_string (zend_bool trigger_break, const char *format,...) ZEND_ATTRIBUTE_FORMAT(printf
ZEND_API void void zend_activate (TSRMLS_D)
void zend_deactivate (TSRMLS_D)
void zend_call_destructors (TSRMLS_D)
void zend_activate_modules (TSRMLS_D)
void zend_deactivate_modules (TSRMLS_D)
void zend_post_deactivate_modules (TSRMLS_D)
ZEND_API void free_estring (char **str_p)
ZEND_API void zend_error (int type, const char *format,...) ZEND_ATTRIBUTE_FORMAT(printf
ZEND_API void void zenderror (const char *error)
ZEND_API void zend_message_dispatcher (long message, void *data TSRMLS_DC)
ZEND_API int zend_get_configuration_directive (const char *name, uint name_length, zval *contents)
ZEND_API void zend_save_error_handling (zend_error_handling *current TSRMLS_DC)
ZEND_API void zend_replace_error_handling (zend_error_handling_t error_handling, zend_class_entry *exception_class, zend_error_handling *current TSRMLS_DC)
ZEND_API void zend_restore_error_handling (zend_error_handling *saved TSRMLS_DC)

Variables

ZEND_API int(* zend_printf )(const char *format,...) ZEND_ATTRIBUTE_PTR_FORMAT(printf
ZEND_API int(*) ZEND_API
zend_write_func_ 
zend_write )
ZEND_API FILE *(* zend_fopen )(const char *filename, char **opened_path TSRMLS_DC)
ZEND_API void(* zend_block_interruptions )(void)
ZEND_API void(* zend_unblock_interruptions )(void)
ZEND_API void(* zend_ticks_function )(int ticks)
ZEND_API void(* zend_error_cb )(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf
ZEND_API void(*) void(* zend_on_timeout )(int seconds TSRMLS_DC)
ZEND_API int(* zend_stream_open_function )(const char *filename, zend_file_handle *handle TSRMLS_DC)
int(* zend_vspprintf )(char **pbuf, size_t max_len, const char *format, va_list ap)
ZEND_API char *(* zend_getenv )(char *name, size_t name_len TSRMLS_DC)
ZEND_API char *(* zend_resolve_path )(const char *filename, int filename_len TSRMLS_DC)
ZEND_API zend_class_entry * zend_standard_class_def
ZEND_API zend_utility_values zend_uv
ZEND_API zval zval_used_for_init

Class Documentation

struct _zend_guard

Definition at line 289 of file zend.h.

Class Members
zend_bool dummy
zend_bool in_get
zend_bool in_isset
zend_bool in_set
zend_bool in_unset
struct _zend_object

Definition at line 297 of file zend.h.

Collaboration diagram for _zend_object:
Class Members
zend_class_entry * ce
HashTable * guards
HashTable * properties
union _zvalue_value

Definition at line 305 of file zend.h.

Collaboration diagram for _zvalue_value:
Class Members
double dval
HashTable * ht
long lval
zend_object_value obj
struct _zvalue_value str
struct _zval_struct

Definition at line 316 of file zend.h.

Collaboration diagram for _zval_struct:
Class Members
zend_uchar is_ref__gc
zend_uint refcount__gc
zend_uchar type
zvalue_value value
struct _zend_utility_values

Definition at line 490 of file zend.h.

Class Members
zend_bool html_errors
char * import_use_extension
uint import_use_extension_length
struct zend_error_handling

Definition at line 764 of file zend.h.

Class Members
zend_class_entry * exception
zend_error_handling_t handling
zval * user_handler
struct _zvalue_value.str

Definition at line 308 of file zend.h.

Class Members
int len
char * val

Define Documentation

#define __restrict__

Definition at line 179 of file zend.h.

#define ALLOC_INIT_ZVAL (   zp)
Value:
ALLOC_ZVAL(zp);             \
       INIT_ZVAL(*zp);

Definition at line 669 of file zend.h.

#define ALLOCA_FLAG (   name)

Definition at line 196 of file zend.h.

#define BEGIN_EXTERN_C ( )

Definition at line 33 of file zend.h.

#define COPY_PZVAL_TO_ZVAL (   zv,
  pzv 
)
Value:
(zv) = *(pzv);                                                 \
       if (Z_REFCOUNT_P(pzv)>1) {                       \
              zval_copy_ctor(&(zv));                           \
              Z_DELREF_P((pzv));                               \
       } else {                                                       \
              FREE_ZVAL(pzv);                                         \
       }                                                                     \
       INIT_PZVAL(&(zv));

Definition at line 704 of file zend.h.

#define DEBUG_BACKTRACE_IGNORE_ARGS   (1<<1)

Definition at line 775 of file zend.h.

#define DEBUG_BACKTRACE_PROVIDE_OBJECT   (1<<0)

Definition at line 774 of file zend.h.

#define DL_HANDLE   void *

Definition at line 115 of file zend.h.

#define do_alloca (   p,
  use_heap 
)    emalloc(p)

Definition at line 198 of file zend.h.

Definition at line 63 of file zend.h.

#define END_EXTERN_C ( )

Definition at line 34 of file zend.h.

#define EXPECTED (   condition)    (condition)

Definition at line 368 of file zend.h.

#define FAILURE   -1 /* this MUST stay a negative number, or it may affect functions! */

Definition at line 268 of file zend.h.

#define free_alloca (   p,
  use_heap 
)    efree(p)

Definition at line 199 of file zend.h.

Definition at line 645 of file zend.h.

Definition at line 646 of file zend.h.

#define INIT_PZVAL (   z)
Value:
(z)->refcount__gc = 1;      \
       (z)->is_ref__gc = 0;

Definition at line 663 of file zend.h.

#define INIT_ZVAL (   z)    z = zval_used_for_init;

Definition at line 667 of file zend.h.

#define INTERNAL_FUNCTION_PARAM_PASSTHRU   ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC

Definition at line 275 of file zend.h.

#define INTERNAL_FUNCTION_PARAMETERS   int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC

Definition at line 274 of file zend.h.

#define IS_ARRAY   4

Definition at line 515 of file zend.h.

#define IS_BOOL   3

Definition at line 514 of file zend.h.

#define IS_CONSTANT   8

Definition at line 519 of file zend.h.

#define IS_CONSTANT_ARRAY   9

Definition at line 520 of file zend.h.

#define IS_CONSTANT_INDEX   0x80

Definition at line 525 of file zend.h.

#define IS_CONSTANT_TYPE_MASK   0x0f

Definition at line 523 of file zend.h.

#define IS_CONSTANT_UNQUALIFIED   0x10

Definition at line 524 of file zend.h.

#define IS_DOUBLE   2

Definition at line 513 of file zend.h.

#define IS_LEXICAL_REF   0x40

Definition at line 527 of file zend.h.

#define IS_LEXICAL_VAR   0x20

Definition at line 526 of file zend.h.

#define IS_LONG   1

Definition at line 512 of file zend.h.

#define IS_NULL   0

Definition at line 511 of file zend.h.

#define IS_OBJECT   5

Definition at line 516 of file zend.h.

#define IS_RESOURCE   7

Definition at line 518 of file zend.h.

#define IS_STRING   6

Definition at line 517 of file zend.h.

#define JMP_BUF   jmp_buf

Definition at line 553 of file zend.h.

#define LONGJMP (   a,
 
)    longjmp(a, b)

Definition at line 552 of file zend.h.

#define MAKE_COPY_ZVAL (   ppzv,
  pzv 
)
Value:
*(pzv) = **(ppzv);            \
       zval_copy_ctor((pzv));        \
       INIT_PZVAL((pzv));

Definition at line 714 of file zend.h.

#define MAKE_STD_ZVAL (   zv)
Value:
ALLOC_ZVAL(zv); \
       INIT_PZVAL(zv);

Definition at line 673 of file zend.h.

#define MAX (   a,
 
)    (((a)>(b))?(a):(b))

Definition at line 500 of file zend.h.

#define MAX_LENGTH_OF_DOUBLE   32

Definition at line 263 of file zend.h.

#define MIN (   a,
 
)    (((a)<(b))?(a):(b))

Definition at line 501 of file zend.h.

#define OE_IS_ARRAY   (1<<0)

Definition at line 530 of file zend.h.

#define OE_IS_METHOD   (1<<2)

Definition at line 532 of file zend.h.

#define OE_IS_OBJECT   (1<<1)

Definition at line 531 of file zend.h.

#define PZVAL_IS_REF (   z)    Z_ISREF_P(z)

Definition at line 677 of file zend.h.

#define READY_TO_DESTROY (   zv)
Value:
(Z_REFCOUNT_P(zv) == 1 && \
        (Z_TYPE_P(zv) != IS_OBJECT || \
         zend_objects_store_get_refcount(zv TSRMLS_CC) == 1))

Definition at line 747 of file zend.h.

#define REPLACE_ZVAL_VALUE (   ppzv_dest,
  pzv_src,
  copy 
)
Value:
{      \
       int is_ref, refcount;                                          \
												\
	SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest);            \
       is_ref = Z_ISREF_PP(ppzv_dest);                         \
       refcount = Z_REFCOUNT_PP(ppzv_dest);             \
       zval_dtor(*ppzv_dest);                                         \
       **ppzv_dest = *pzv_src;                                        \
       if (copy) {                                 \
              zval_copy_ctor(*ppzv_dest);                      \
    }                                             \
       Z_SET_ISREF_TO_PP(ppzv_dest, is_ref);            \
       Z_SET_REFCOUNT_PP(ppzv_dest, refcount);          \
}

Definition at line 719 of file zend.h.

#define restrict   __restrict__

Definition at line 181 of file zend.h.

#define SEPARATE_ARG_IF_REF (   varptr)
Value:
if (PZVAL_IS_REF(varptr)) { \
              zval *original_var = varptr; \
              ALLOC_ZVAL(varptr); \
              varptr->value = original_var->value; \
              Z_TYPE_P(varptr) = Z_TYPE_P(original_var); \
              Z_UNSET_ISREF_P(varptr); \
              Z_SET_REFCOUNT_P(varptr, 1); \
              zval_copy_ctor(varptr); \
       } else { \
              Z_ADDREF_P(varptr); \
       }

Definition at line 734 of file zend.h.

#define SEPARATE_ZVAL (   ppzv)
Value:
{                                                                                                 \
              zval *orig_ptr = *(ppzv);                                             \
															\
		if (Z_REFCOUNT_P(orig_ptr) > 1) {                                   \
                     Z_DELREF_P(orig_ptr);                                                 \
                     ALLOC_ZVAL(*(ppzv));                                           \
                     **(ppzv) = *orig_ptr;                                                 \
                     zval_copy_ctor(*(ppzv));                                       \
                     Z_SET_REFCOUNT_PP(ppzv, 1);                                    \
                     Z_UNSET_ISREF_PP((ppzv));                                      \
              }                                                                                          \
       }

Definition at line 679 of file zend.h.

#define SEPARATE_ZVAL_IF_NOT_REF (   ppzv)
Value:
if (!PZVAL_IS_REF(*ppzv)) {                      \
              SEPARATE_ZVAL(ppzv);                      \
       }

Definition at line 693 of file zend.h.

#define SEPARATE_ZVAL_TO_MAKE_IS_REF (   ppzv)
Value:
if (!PZVAL_IS_REF(*ppzv)) {                      \
              SEPARATE_ZVAL(ppzv);                      \
              Z_SET_ISREF_PP((ppzv));                          \
       }

Definition at line 698 of file zend.h.

#define SET_ALLOCA_FLAG (   name)

Definition at line 197 of file zend.h.

#define SETJMP (   a)    setjmp(a)

Definition at line 551 of file zend.h.

#define STR_EMPTY_ALLOC ( )    estrndup("", sizeof("")-1)

Definition at line 605 of file zend.h.

#define STR_FREE (   ptr)    if (ptr) { efree(ptr); }

Definition at line 602 of file zend.h.

#define STR_FREE_REL (   ptr)    if (ptr) { efree_rel(ptr); }

Definition at line 603 of file zend.h.

#define STR_REALLOC (   ptr,
  size 
)    ptr = (char *) erealloc(ptr, size);

Definition at line 607 of file zend.h.

#define SUCCESS   0

Definition at line 267 of file zend.h.

#define UNEXPECTED (   condition)    (condition)

Definition at line 369 of file zend.h.

#define Z_ADDREF (   z)    Z_ADDREF_P(&(z))

Definition at line 344 of file zend.h.

#define Z_ADDREF_P (   pz)    zval_addref_p(pz)

Definition at line 335 of file zend.h.

#define Z_ADDREF_PP (   ppz)    Z_ADDREF_P(*(ppz))

Definition at line 326 of file zend.h.

#define Z_DBG (   expr)

Definition at line 593 of file zend.h.

#define Z_DELREF (   z)    Z_DELREF_P(&(z))

Definition at line 345 of file zend.h.

#define Z_DELREF_P (   pz)    zval_delref_p(pz)

Definition at line 336 of file zend.h.

#define Z_DELREF_PP (   ppz)    Z_DELREF_P(*(ppz))

Definition at line 327 of file zend.h.

#define Z_ISREF (   z)    Z_ISREF_P(&(z))

Definition at line 346 of file zend.h.

#define Z_ISREF_P (   pz)    zval_isref_p(pz)

Definition at line 337 of file zend.h.

#define Z_ISREF_PP (   ppz)    Z_ISREF_P(*(ppz))

Definition at line 328 of file zend.h.

#define Z_REFCOUNT (   z)    Z_REFCOUNT_P(&(z))

Definition at line 342 of file zend.h.

#define Z_REFCOUNT_P (   pz)    zval_refcount_p(pz)

Definition at line 333 of file zend.h.

#define Z_REFCOUNT_PP (   ppz)    Z_REFCOUNT_P(*(ppz))

Definition at line 324 of file zend.h.

#define Z_SET_ISREF (   z)    Z_SET_ISREF_P(&(z))

Definition at line 347 of file zend.h.

#define Z_SET_ISREF_P (   pz)    zval_set_isref_p(pz)

Definition at line 338 of file zend.h.

#define Z_SET_ISREF_PP (   ppz)    Z_SET_ISREF_P(*(ppz))

Definition at line 329 of file zend.h.

#define Z_SET_ISREF_TO (   z,
  isref 
)    Z_SET_ISREF_TO_P(&(z), isref)

Definition at line 349 of file zend.h.

#define Z_SET_ISREF_TO_P (   pz,
  isref 
)    zval_set_isref_to_p(pz, isref)

Definition at line 340 of file zend.h.

#define Z_SET_ISREF_TO_PP (   ppz,
  isref 
)    Z_SET_ISREF_TO_P(*(ppz), isref)

Definition at line 331 of file zend.h.

#define Z_SET_REFCOUNT (   z,
  rc 
)    Z_SET_REFCOUNT_P(&(z), rc)

Definition at line 343 of file zend.h.

#define Z_SET_REFCOUNT_P (   pz,
  rc 
)    zval_set_refcount_p(pz, rc)

Definition at line 334 of file zend.h.

#define Z_SET_REFCOUNT_PP (   ppz,
  rc 
)    Z_SET_REFCOUNT_P(*(ppz), rc)

Definition at line 325 of file zend.h.

#define Z_UNSET_ISREF (   z)    Z_UNSET_ISREF_P(&(z))

Definition at line 348 of file zend.h.

#define Z_UNSET_ISREF_P (   pz)    zval_unset_isref_p(pz)

Definition at line 339 of file zend.h.

#define Z_UNSET_ISREF_PP (   ppz)    Z_UNSET_ISREF_P(*(ppz))

Definition at line 330 of file zend.h.

#define zend_always_inline   inline

Definition at line 361 of file zend.h.

Definition at line 166 of file zend.h.

#define ZEND_ATTRIBUTE_FORMAT (   type,
  idx,
  first 
)

Definition at line 152 of file zend.h.

Definition at line 146 of file zend.h.

#define ZEND_ATTRIBUTE_PTR_FORMAT (   type,
  idx,
  first 
)

Definition at line 158 of file zend.h.

#define zend_bailout ( )    _zend_bailout(__FILE__, __LINE__)

Definition at line 544 of file zend.h.

#define zend_catch
Value:
} else {                                                                                   \
                     EG(bailout) = __orig_bailout;

Definition at line 563 of file zend.h.

#define zend_end_try ( )
Value:
}                                                                                                 \
              EG(bailout) = __orig_bailout;                                                \
       }

Definition at line 566 of file zend.h.

#define ZEND_ENGINE_2

Definition at line 27 of file zend.h.

Definition at line 280 of file zend.h.

#define ZEND_EXTENSIONS_SUPPORT   0

Definition at line 116 of file zend.h.

#define ZEND_FASTCALL

Definition at line 174 of file zend.h.

Definition at line 222 of file zend.h.

Definition at line 223 of file zend.h.

Definition at line 216 of file zend.h.

Definition at line 217 of file zend.h.

Definition at line 224 of file zend.h.

Definition at line 225 of file zend.h.

Definition at line 218 of file zend.h.

Definition at line 219 of file zend.h.

Definition at line 226 of file zend.h.

Definition at line 227 of file zend.h.

Definition at line 220 of file zend.h.

Definition at line 221 of file zend.h.

#define zend_first_try   EG(bailout)=NULL; zend_try

Definition at line 570 of file zend.h.

#define ZEND_GCC_VERSION   0

Definition at line 140 of file zend.h.

#define ZEND_LOG_XOR (   a,
 
)    (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))

Definition at line 507 of file zend.h.

Definition at line 752 of file zend.h.

#define ZEND_NORMALIZE_BOOL (   n)    ((n) ? (((n)>0) ? 1 : -1) : 0)

Definition at line 504 of file zend.h.

#define ZEND_PATHS_SEPARATOR   ':'

Definition at line 52 of file zend.h.

#define ZEND_PUTC (   c)    zend_write(&(c), 1), (c)

Definition at line 615 of file zend.h.

#define ZEND_PUTS (   str)    zend_write((str), strlen((str)))

Definition at line 613 of file zend.h.

#define ZEND_PUTS_EX (   str)    write_func((str), strlen((str)))

Definition at line 614 of file zend.h.

Definition at line 636 of file zend.h.

#define ZEND_STRL (   str)    (str), (sizeof(str)-1)

Definition at line 502 of file zend.h.

#define ZEND_STRS (   str)    (str), (sizeof(str))

Definition at line 503 of file zend.h.

#define ZEND_TRUTH (   x)    ((x) ? 1 : 0)

Definition at line 506 of file zend.h.

#define zend_try
Value:
{                                                                                                        \
              JMP_BUF *__orig_bailout = EG(bailout);                                \
              JMP_BUF __bailout;                                                                  \
																\
		EG(bailout) = &__bailout;                                                  \
              if (SETJMP(__bailout)==0) {

Definition at line 556 of file zend.h.

#define ZEND_UV (   name)    (zend_uv.name)

Definition at line 643 of file zend.h.

#define ZEND_VERSION   "2.3.0"

Definition at line 25 of file zend.h.

#define ZEND_WRITE (   str,
  str_len 
)    zend_write((str), (str_len))

Definition at line 611 of file zend.h.

#define ZEND_WRITE_EX (   str,
  str_len 
)    write_func((str), (str_len))

Definition at line 612 of file zend.h.

#define ZMSG_FAILED_HIGHLIGHT_FOPEN   3L

Definition at line 657 of file zend.h.

#define ZMSG_FAILED_INCLUDE_FOPEN   1L

Definition at line 655 of file zend.h.

#define ZMSG_FAILED_REQUIRE_FOPEN   2L

Definition at line 656 of file zend.h.

#define ZMSG_LOG_SCRIPT_NAME   6L

Definition at line 660 of file zend.h.

#define ZMSG_MEMORY_LEAK_DETECTED   4L

Definition at line 658 of file zend.h.

#define ZMSG_MEMORY_LEAK_REPEATED   5L

Definition at line 659 of file zend.h.

Definition at line 661 of file zend.h.

#define ZTS_V   0

Definition at line 233 of file zend.h.


Typedef Documentation

typedef struct _zend_class_entry

Definition at line 287 of file zend.h.

typedef struct _zend_serialize_data

Definition at line 415 of file zend.h.

typedef struct _zend_unserialize_data

Definition at line 416 of file zend.h.

typedef struct _zval_struct

Definition at line 286 of file zend.h.

typedef struct _zend_guard zend_guard
typedef struct _zend_object zend_object
typedef int(* zend_write_func_t)(const char *str, uint str_length)

Definition at line 496 of file zend.h.

typedef union _zvalue_value zvalue_value

Enumeration Type Documentation

Enumerator:
EH_NORMAL 
EH_SUPPRESS 
EH_THROW 

Definition at line 758 of file zend.h.


Function Documentation

ZEND_API void _zend_bailout ( char *  filename,
uint  lineno 
)

Definition at line 802 of file zend.c.

{
       TSRMLS_FETCH();

       if (!EG(bailout)) {
              zend_output_debug_string(1, "%s(%d) : Bailed out without a bailout address!", filename, lineno);
              exit(-1);
       }
       CG(unclean_shutdown) = 1;
       CG(active_class_entry) = NULL;
       CG(in_compilation) = EG(in_execution) = 0;
       EG(current_execute_data) = NULL;
       LONGJMP(*EG(bailout), FAILURE);
}

Here is the call graph for this function:

char* alloca ( )
ZEND_API void free_estring ( char **  str_p)

Definition at line 1304 of file zend.c.

{
       efree(*str_p);
}

Here is the caller graph for this function:

ZEND_API char* get_zend_version ( void  )

Definition at line 841 of file zend.c.

{
       return zend_version_info;
}

Here is the caller graph for this function:

ZEND_API void void zend_activate ( TSRMLS_D  )

Definition at line 847 of file zend.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 856 of file zend.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 872 of file zend.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 880 of file zend.c.

{
       /* we're no longer executing anything */
       EG(opline_ptr) = NULL;
       EG(active_symbol_table) = NULL;

       zend_try {
              shutdown_scanner(TSRMLS_C);
       } zend_end_try();

       /* shutdown_executor() takes care of its own bailout handling */
       shutdown_executor(TSRMLS_C);

       zend_try {
              shutdown_compiler(TSRMLS_C);
       } zend_end_try();

       zend_destroy_rsrc_list(&EG(regular_list) TSRMLS_CC);

#ifdef ZEND_DEBUG
       if (GC_G(gc_enabled) && !CG(unclean_shutdown)) {
              gc_collect_cycles(TSRMLS_C);
       }
#endif

#if GC_BENCH
       fprintf(stderr, "GC Statistics\n");
       fprintf(stderr, "-------------\n");
       fprintf(stderr, "Runs:               %d\n", GC_G(gc_runs));
       fprintf(stderr, "Collected:          %d\n", GC_G(collected));
       fprintf(stderr, "Root buffer length: %d\n", GC_G(root_buf_length));
       fprintf(stderr, "Root buffer peak:   %d\n\n", GC_G(root_buf_peak));
       fprintf(stderr, "      Possible            Remove from  Marked\n");
       fprintf(stderr, "        Root    Buffered     buffer     grey\n");
       fprintf(stderr, "      --------  --------  -----------  ------\n");
       fprintf(stderr, "ZVAL  %8d  %8d  %9d  %8d\n", GC_G(zval_possible_root), GC_G(zval_buffered), GC_G(zval_remove_from_buffer), GC_G(zval_marked_grey));
       fprintf(stderr, "ZOBJ  %8d  %8d  %9d  %8d\n", GC_G(zobj_possible_root), GC_G(zobj_buffered), GC_G(zobj_remove_from_buffer), GC_G(zobj_marked_grey));
#endif

       zend_try {
              zend_ini_deactivate(TSRMLS_C);
       } zend_end_try();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 862 of file zend.c.

{
       EG(opline_ptr) = NULL; /* we're no longer executing anything */

       zend_try {
              zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
       } zend_end_try();
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_error ( int  type,
const char *  format,
  ... 
)
ZEND_API int zend_get_configuration_directive ( const char *  name,
uint  name_length,
zval *  contents 
)

Definition at line 951 of file zend.c.

{
       if (zend_get_configuration_directive_p) {
              return zend_get_configuration_directive_p(name, name_length, contents);
       } else {
              return FAILURE;
       }
}

Here is the caller graph for this function:

ZEND_API void zend_make_printable_zval ( zval *  expr,
zval *  expr_copy,
int use_copy 
)

Definition at line 211 of file zend.c.

{
       if (Z_TYPE_P(expr)==IS_STRING) {
              *use_copy = 0;
              return;
       }
       switch (Z_TYPE_P(expr)) {
              case IS_NULL:
                     Z_STRLEN_P(expr_copy) = 0;
                     Z_STRVAL_P(expr_copy) = STR_EMPTY_ALLOC();
                     break;
              case IS_BOOL:
                     if (Z_LVAL_P(expr)) {
                            Z_STRLEN_P(expr_copy) = 1;
                            Z_STRVAL_P(expr_copy) = estrndup("1", 1);
                     } else {
                            Z_STRLEN_P(expr_copy) = 0;
                            Z_STRVAL_P(expr_copy) = STR_EMPTY_ALLOC();
                     }
                     break;
              case IS_RESOURCE:
                     Z_STRVAL_P(expr_copy) = (char *) emalloc(sizeof("Resource id #") - 1 + MAX_LENGTH_OF_LONG);
                     Z_STRLEN_P(expr_copy) = sprintf(Z_STRVAL_P(expr_copy), "Resource id #%ld", Z_LVAL_P(expr));
                     break;
              case IS_ARRAY:
                     Z_STRLEN_P(expr_copy) = sizeof("Array") - 1;
                     Z_STRVAL_P(expr_copy) = estrndup("Array", Z_STRLEN_P(expr_copy));
                     break;
              case IS_OBJECT:
                     {
                            TSRMLS_FETCH();

                            if (Z_OBJ_HANDLER_P(expr, cast_object) && Z_OBJ_HANDLER_P(expr, cast_object)(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
                                   break;
                            }
                            /* Standard PHP objects */
                            if (Z_OBJ_HT_P(expr) == &std_object_handlers || !Z_OBJ_HANDLER_P(expr, cast_object)) {
                                   if (zend_std_cast_object_tostring(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
                                          break;
                                   }
                            }
                            if (!Z_OBJ_HANDLER_P(expr, cast_object) && Z_OBJ_HANDLER_P(expr, get)) {
                                   zval *z = Z_OBJ_HANDLER_P(expr, get)(expr TSRMLS_CC);

                                   Z_ADDREF_P(z);
                                   if (Z_TYPE_P(z) != IS_OBJECT) {
                                          zend_make_printable_zval(z, expr_copy, use_copy);
                                          if (*use_copy) {
                                                 zval_ptr_dtor(&z);
                                          } else {
                                                 ZVAL_ZVAL(expr_copy, z, 0, 1);
                                                 *use_copy = 1;
                                          }
                                          return;
                                   }
                                   zval_ptr_dtor(&z);
                            }
                            zend_error(EG(exception) ? E_ERROR : E_RECOVERABLE_ERROR, "Object of class %s could not be converted to string", Z_OBJCE_P(expr)->name);
                            Z_STRLEN_P(expr_copy) = 0;
                            Z_STRVAL_P(expr_copy) = STR_EMPTY_ALLOC();
                     }
                     break;
              case IS_DOUBLE:
                     *expr_copy = *expr;
                     zval_copy_ctor(expr_copy);
                     zend_locale_sprintf_double(expr_copy ZEND_FILE_LINE_CC);
                     break;
              default:
                     *expr_copy = *expr;
                     zval_copy_ctor(expr_copy);
                     convert_to_string(expr_copy);
                     break;
       }
       Z_TYPE_P(expr_copy) = IS_STRING;
       *use_copy = 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_message_dispatcher ( long  message,
void *data  TSRMLS_DC 
)

Definition at line 942 of file zend.c.

Here is the caller graph for this function:

ZEND_API void zend_output_debug_string ( zend_bool  trigger_break,
const char *  format,
  ... 
)

Definition at line 934 of file zend.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 726 of file zend.c.

{
#ifdef ZTS
       zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id);
       zend_executor_globals *executor_globals = ts_resource(executor_globals_id);

       *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table;
       *GLOBAL_CLASS_TABLE = *compiler_globals->class_table;
       *GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants;

       asp_tags_default = CG(asp_tags);
       short_tags_default = CG(short_tags);
       ct_pass_ref_default = CG(allow_call_time_pass_reference);
       compiler_options_default = CG(compiler_options);

       zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
       free(compiler_globals->function_table);
       free(compiler_globals->class_table);
       compiler_globals_ctor(compiler_globals, tsrm_ls);
       free(EG(zend_constants));
       executor_globals_ctor(executor_globals, tsrm_ls);
       global_persistent_list = &EG(persistent_list);
       zend_copy_ini_directives(TSRMLS_C);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_print_flat_zval_r ( zval *expr  TSRMLS_DC)

Definition at line 318 of file zend.c.

{
       switch (Z_TYPE_P(expr)) {
              case IS_ARRAY:
                     ZEND_PUTS("Array (");
                     if (++Z_ARRVAL_P(expr)->nApplyCount>1) {
                            ZEND_PUTS(" *RECURSION*");
                            Z_ARRVAL_P(expr)->nApplyCount--;
                            return;
                     }
                     print_flat_hash(Z_ARRVAL_P(expr) TSRMLS_CC);
                     ZEND_PUTS(")");
                     Z_ARRVAL_P(expr)->nApplyCount--;
                     break;
              case IS_OBJECT:
              {
                     HashTable *properties = NULL;
                     char *class_name = NULL;
                     zend_uint clen;

                     if (Z_OBJ_HANDLER_P(expr, get_class_name)) {
                            Z_OBJ_HANDLER_P(expr, get_class_name)(expr, &class_name, &clen, 0 TSRMLS_CC);
                     }
                     if (class_name) {
                            zend_printf("%s Object (", class_name);
                     } else {
                            zend_printf("%s Object (", "Unknown Class");
                     }
                     if (class_name) {
                            efree(class_name);
                     }
                     if (Z_OBJ_HANDLER_P(expr, get_properties)) {
                            properties = Z_OBJPROP_P(expr);
                     }
                     if (properties) {
                            if (++properties->nApplyCount>1) {
                                   ZEND_PUTS(" *RECURSION*");
                                   properties->nApplyCount--;
                                   return;
                            }
                            print_flat_hash(properties TSRMLS_CC);
                            properties->nApplyCount--;
                     }
                     ZEND_PUTS(")");
                     break;
              }
              default:
                     zend_print_variable(expr);
                     break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_print_zval ( zval *  expr,
int  indent 
)

Definition at line 289 of file zend.c.

{
       return zend_print_zval_ex(zend_write, expr, indent);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API int zend_print_zval_ex ( zend_write_func_t  write_func,
zval *  expr,
int  indent 
)

Definition at line 295 of file zend.c.

{
       zval expr_copy;
       int use_copy;

       zend_make_printable_zval(expr, &expr_copy, &use_copy);
       if (use_copy) {
              expr = &expr_copy;
       }
       if (Z_STRLEN_P(expr) == 0) { /* optimize away empty strings */
              if (use_copy) {
                     zval_dtor(expr);
              }
              return 0;
       }
       write_func(Z_STRVAL_P(expr), Z_STRLEN_P(expr));
       if (use_copy) {
              zval_dtor(expr);
       }
       return Z_STRLEN_P(expr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_print_zval_r ( zval *  expr,
int indent  TSRMLS_DC 
)

Definition at line 371 of file zend.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void zend_print_zval_r_ex ( zend_write_func_t  write_func,
zval *  expr,
int indent  TSRMLS_DC 
)

Definition at line 377 of file zend.c.

{
       switch (Z_TYPE_P(expr)) {
              case IS_ARRAY:
                     ZEND_PUTS_EX("Array\n");
                     if (++Z_ARRVAL_P(expr)->nApplyCount>1) {
                            ZEND_PUTS_EX(" *RECURSION*");
                            Z_ARRVAL_P(expr)->nApplyCount--;
                            return;
                     }
                     print_hash(write_func, Z_ARRVAL_P(expr), indent, 0 TSRMLS_CC);
                     Z_ARRVAL_P(expr)->nApplyCount--;
                     break;
              case IS_OBJECT:
                     {
                            HashTable *properties;
                            char *class_name = NULL;
                            zend_uint clen;
                            int is_temp;

                            if (Z_OBJ_HANDLER_P(expr, get_class_name)) {
                                   Z_OBJ_HANDLER_P(expr, get_class_name)(expr, &class_name, &clen, 0 TSRMLS_CC);
                            }
                            if (class_name) {
                                   ZEND_PUTS_EX(class_name);
                            } else {
                                   ZEND_PUTS_EX("Unknown Class");
                            }
                            ZEND_PUTS_EX(" Object\n");
                            if (class_name) {
                                   efree(class_name);
                            }
                            if ((properties = Z_OBJDEBUG_P(expr, is_temp)) == NULL) {
                                   break;
                            }
                            if (++properties->nApplyCount>1) {
                                   ZEND_PUTS_EX(" *RECURSION*");
                                   properties->nApplyCount--;
                                   return;
                            }
                            print_hash(write_func, properties, indent, 1 TSRMLS_CC);
                            properties->nApplyCount--;
                            if (is_temp) {
                                   zend_hash_destroy(properties);
                                   efree(properties);
                            }
                            break;
                     }
              default:
                     zend_print_zval_ex(write_func, expr, indent);
                     break;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 715 of file zend.c.

{
       int module_number = 0;

       REGISTER_INI_ENTRIES();
}

Here is the caller graph for this function:

ZEND_API void zend_replace_error_handling ( zend_error_handling_t  error_handling,
zend_class_entry *  exception_class,
zend_error_handling *current  TSRMLS_DC 
)

Definition at line 3605 of file zend_API.c.

{
       if (current) {
              zend_save_error_handling(current TSRMLS_CC);
              if (error_handling != EH_NORMAL && EG(user_error_handler)) {
                     zval_ptr_dtor(&EG(user_error_handler));
                     EG(user_error_handler) = NULL;
              }
       }
       EG(error_handling) = error_handling;
       EG(exception_class) = error_handling == EH_THROW ? exception_class : NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3619 of file zend_API.c.

{
       EG(error_handling) = saved->handling;
       EG(exception_class) = saved->handling == EH_THROW ? saved->exception : NULL;
       if (saved->user_handler     && saved->user_handler != EG(user_error_handler)) {
              if (EG(user_error_handler)) {
                     zval_ptr_dtor(&EG(user_error_handler));
              }
              EG(user_error_handler) = saved->user_handler;
       } else if (saved->user_handler) {
              zval_ptr_dtor(&saved->user_handler);
       }
       saved->user_handler = NULL;
}

Here is the caller graph for this function:

Definition at line 3594 of file zend_API.c.

{
       current->handling = EG(error_handling);
       current->exception = EG(exception_class);
       current->user_handler = EG(user_error_handler);
       if (current->user_handler) {
              Z_ADDREF_P(current->user_handler);
       }
}

Here is the caller graph for this function:

void zend_set_utility_values ( zend_utility_values utility_values)

Definition at line 787 of file zend.c.

Here is the caller graph for this function:

void zend_shutdown ( TSRMLS_D  )
int zend_startup ( zend_utility_functions utility_functions,
char **extensions  TSRMLS_DC 
)

Definition at line 598 of file zend.c.

{
#ifdef ZTS
       zend_compiler_globals *compiler_globals;
       zend_executor_globals *executor_globals;
       extern ZEND_API ts_rsrc_id ini_scanner_globals_id;
       extern ZEND_API ts_rsrc_id language_scanner_globals_id;
#else
       extern zend_ini_scanner_globals ini_scanner_globals;
       extern zend_php_scanner_globals language_scanner_globals;
#endif

       start_memory_manager(TSRMLS_C);

#if defined(__FreeBSD__) || defined(__DragonFly__)
       /* FreeBSD and DragonFly floating point precision fix */
       fpsetmask(0);
#endif

       zend_startup_strtod();
       zend_startup_extensions_mechanism();

       /* Set up utility functions and values */
       zend_error_cb = utility_functions->error_function;
       zend_printf = utility_functions->printf_function;
       zend_write = (zend_write_func_t) utility_functions->write_function;
       zend_fopen = utility_functions->fopen_function;
       if (!zend_fopen) {
              zend_fopen = zend_fopen_wrapper;
       }
       zend_stream_open_function = utility_functions->stream_open_function;
       zend_message_dispatcher_p = utility_functions->message_handler;
       zend_block_interruptions = utility_functions->block_interruptions;
       zend_unblock_interruptions = utility_functions->unblock_interruptions;
       zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
       zend_ticks_function = utility_functions->ticks_function;
       zend_on_timeout = utility_functions->on_timeout;
       zend_vspprintf = utility_functions->vspprintf_function;
       zend_getenv = utility_functions->getenv_function;
       zend_resolve_path = utility_functions->resolve_path_function;

       zend_compile_file = compile_file;
       zend_compile_string = compile_string;
       zend_execute = execute;
       zend_execute_internal = NULL;
       zend_throw_exception_hook = NULL;

       zend_init_opcodes_handlers();

       /* set up version */
       zend_version_info = strdup(ZEND_CORE_VERSION_INFO);
       zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO) - 1;

       GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable));
       GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable));
       GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable));
       GLOBAL_CONSTANTS_TABLE = (HashTable *) malloc(sizeof(HashTable));

       zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
       zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
       zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0);
       zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0);

       zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
       zend_init_rsrc_list_dtors();

       /* This zval can be used to initialize allocate zval's to an uninit'ed value */
       Z_UNSET_ISREF(zval_used_for_init);
       Z_SET_REFCOUNT(zval_used_for_init, 1);
       Z_TYPE(zval_used_for_init) = IS_NULL;

#ifdef ZTS
       ts_allocate_id(&compiler_globals_id, sizeof(zend_compiler_globals), (ts_allocate_ctor) compiler_globals_ctor, (ts_allocate_dtor) compiler_globals_dtor);
       ts_allocate_id(&executor_globals_id, sizeof(zend_executor_globals), (ts_allocate_ctor) executor_globals_ctor, (ts_allocate_dtor) executor_globals_dtor);
       ts_allocate_id(&language_scanner_globals_id, sizeof(zend_php_scanner_globals), (ts_allocate_ctor) php_scanner_globals_ctor, NULL);
       ts_allocate_id(&ini_scanner_globals_id, sizeof(zend_ini_scanner_globals), (ts_allocate_ctor) ini_scanner_globals_ctor, NULL);
       compiler_globals = ts_resource(compiler_globals_id);
       executor_globals = ts_resource(executor_globals_id);

       compiler_globals_dtor(compiler_globals TSRMLS_CC);
       compiler_globals->in_compilation = 0;
       compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable));
       compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable));

       *compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE;
       *compiler_globals->class_table = *GLOBAL_CLASS_TABLE;
       compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE;

       zend_hash_destroy(executor_globals->zend_constants);
       *executor_globals->zend_constants = *GLOBAL_CONSTANTS_TABLE;
#else
       ini_scanner_globals_ctor(&ini_scanner_globals TSRMLS_CC);
       php_scanner_globals_ctor(&language_scanner_globals TSRMLS_CC);
       zend_set_default_compile_time_values(TSRMLS_C);
       EG(user_error_handler) = NULL;
       EG(user_exception_handler) = NULL;
#endif

       zend_startup_builtin_functions(TSRMLS_C);
       zend_register_standard_constants(TSRMLS_C);
       zend_register_auto_global("GLOBALS", sizeof("GLOBALS") - 1, NULL TSRMLS_CC);

#ifndef ZTS
       zend_init_rsrc_plist(TSRMLS_C);
       zend_init_exception_op(TSRMLS_C);
#endif

       zend_ini_startup(TSRMLS_C);

#ifdef ZTS
       tsrm_set_new_thread_end_handler(zend_new_thread_end_handler);
#endif

       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ZEND_API void void zenderror ( const char *  error)

Definition at line 795 of file zend.c.

{
       zend_error(E_PARSE, "%s", error);
}

Here is the call graph for this function:

static zend_always_inline zend_uint zval_addref_p ( zval *  pz) [static]

Definition at line 380 of file zend.h.

                                                            {
       return ++pz->refcount__gc;
}
static zend_always_inline zend_uint zval_delref_p ( zval *  pz) [static]

Definition at line 384 of file zend.h.

                                                            {
       return --pz->refcount__gc;
}
static zend_always_inline zend_bool zval_isref_p ( zval *  pz) [static]

Definition at line 388 of file zend.h.

                                                           {
       return pz->is_ref__gc;
}
static zend_always_inline zend_uint zval_refcount_p ( zval *  pz) [static]

Definition at line 372 of file zend.h.

                                                              {
       return pz->refcount__gc;
}
static zend_always_inline zend_bool zval_set_isref_p ( zval *  pz) [static]

Definition at line 392 of file zend.h.

                                                               {
       return pz->is_ref__gc = 1;
}
static zend_always_inline zend_bool zval_set_isref_to_p ( zval *  pz,
zend_bool  isref 
) [static]

Definition at line 400 of file zend.h.

                                                                                   {
       return pz->is_ref__gc = isref;
}
static zend_always_inline zend_uint zval_set_refcount_p ( zval *  pz,
zend_uint  rc 
) [static]

Definition at line 376 of file zend.h.

                                                                                {
       return pz->refcount__gc = rc;
}
static zend_always_inline zend_bool zval_unset_isref_p ( zval *  pz) [static]

Definition at line 396 of file zend.h.

                                                                 {
       return pz->is_ref__gc = 0;
}

Variable Documentation

Definition at line 55 of file zend.c.

ZEND_API void(* zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf

Definition at line 58 of file zend.c.

ZEND_API FILE*(* zend_fopen)(const char *filename, char **opened_path TSRMLS_DC)

Definition at line 53 of file zend.c.

ZEND_API char*(* zend_getenv)(char *name, size_t name_len TSRMLS_DC)

Definition at line 60 of file zend.c.

ZEND_API void(*) void(* zend_on_timeout)(int seconds TSRMLS_DC)

Definition at line 63 of file zend.c.

ZEND_API int(* zend_printf)(const char *format,...) ZEND_ATTRIBUTE_PTR_FORMAT(printf

Definition at line 51 of file zend.c.

ZEND_API char*(* zend_resolve_path)(const char *filename, int filename_len TSRMLS_DC)

Definition at line 61 of file zend.c.

ZEND_API zend_class_entry* zend_standard_class_def

Definition at line 50 of file zend.c.

Definition at line 54 of file zend.c.

Definition at line 57 of file zend.c.

Definition at line 56 of file zend.c.

Definition at line 110 of file zend.c.

int(* zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap)

Definition at line 59 of file zend.c.

ZEND_API int(*) ZEND_API zend_write_func_ zend_write)

Definition at line 52 of file zend.c.

Definition at line 112 of file zend.c.