php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_hash.h File Reference
#include "zend_types.h"
#include "zend_gc.h"
#include "zend_string.h"
#include "zend_sort.h"

Go to the source code of this file.

Data Structures

struct  _zend_hash_key
 

Macros

#define HASH_KEY_IS_STRING   1
 
#define HASH_KEY_IS_LONG   2
 
#define HASH_KEY_NON_EXISTENT   3
 
#define HASH_UPDATE   (1<<0)
 
#define HASH_ADD   (1<<1)
 
#define HASH_UPDATE_INDIRECT   (1<<2)
 
#define HASH_ADD_NEW   (1<<3)
 
#define HASH_ADD_NEXT   (1<<4)
 
#define HASH_LOOKUP   (1<<5)
 
#define HASH_FLAG_CONSISTENCY   ((1<<0) | (1<<1))
 
#define HASH_FLAG_PACKED   (1<<2)
 
#define HASH_FLAG_UNINITIALIZED   (1<<3)
 
#define HASH_FLAG_STATIC_KEYS   (1<<4) /* long and interned strings */
 
#define HASH_FLAG_HAS_EMPTY_IND   (1<<5)
 
#define HASH_FLAG_ALLOW_COW_VIOLATION   (1<<6)
 
#define HASH_FLAG_MASK   0xff
 
#define HT_FLAGS(ht)
 
#define HT_INVALIDATE(ht)
 
#define HT_IS_INITIALIZED(ht)
 
#define HT_IS_PACKED(ht)
 
#define HT_IS_WITHOUT_HOLES(ht)
 
#define HT_HAS_STATIC_KEYS_ONLY(ht)
 
#define HT_ALLOW_COW_VIOLATION(ht)
 
#define HT_ITERATORS_COUNT(ht)
 
#define HT_ITERATORS_OVERFLOW(ht)
 
#define HT_HAS_ITERATORS(ht)
 
#define HT_SET_ITERATORS_COUNT(ht, iters)
 
#define HT_INC_ITERATORS_COUNT(ht)
 
#define HT_DEC_ITERATORS_COUNT(ht)
 
#define ZVAL_EMPTY_ARRAY(z)
 
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
 
#define ZEND_HASH_APPLY_KEEP   0
 
#define ZEND_HASH_APPLY_REMOVE   1<<0
 
#define ZEND_HASH_APPLY_STOP   1<<1
 
#define ZEND_HASH_INDEX_FIND(_ht, _h, _ret, _not_found)
 
#define ZEND_HASH_INDEX_LOOKUP(_ht, _h, _ret)
 
#define zend_new_array(size)
 
#define ZEND_INIT_SYMTABLE(ht)
 
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent)
 
#define ZEND_HANDLE_NUMERIC_STR(key, length, idx)
 
#define ZEND_HANDLE_NUMERIC(key, idx)
 
#define zend_hash_get_current_data_ptr(ht)
 
#define ZEND_HASH_ELEMENT_SIZE(__ht)
 
#define ZEND_HASH_ELEMENT_EX(__ht, _idx, _size)
 
#define ZEND_HASH_ELEMENT(__ht, _idx)
 
#define ZEND_HASH_NEXT_ELEMENT(_el, _size)
 
#define ZEND_HASH_PREV_ELEMENT(_el, _size)
 
#define _ZEND_HASH_FOREACH_VAL(_ht)
 
#define _ZEND_HASH_REVERSE_FOREACH_VAL(_ht)
 
#define ZEND_HASH_FOREACH_FROM(_ht, indirect, _from)
 
#define ZEND_HASH_FOREACH(_ht, indirect)
 
#define ZEND_HASH_REVERSE_FOREACH(_ht, indirect)
 
#define ZEND_HASH_FOREACH_END()
 
#define ZEND_HASH_FOREACH_END_DEL()
 
#define ZEND_HASH_FOREACH_BUCKET(ht, _bucket)
 
#define ZEND_HASH_FOREACH_BUCKET_FROM(ht, _bucket, _from)
 
#define ZEND_HASH_REVERSE_FOREACH_BUCKET(ht, _bucket)
 
#define ZEND_HASH_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_FOREACH_VAL_IND(ht, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_VAL_IND(ht, _val)
 
#define ZEND_HASH_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_FOREACH_PTR_FROM(ht, _ptr, _from)
 
#define ZEND_HASH_REVERSE_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_FOREACH_NUM_KEY(ht, _h)
 
#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY(ht, _h)
 
#define ZEND_HASH_FOREACH_STR_KEY(ht, _key)
 
#define ZEND_HASH_REVERSE_FOREACH_STR_KEY(ht, _key)
 
#define ZEND_HASH_FOREACH_KEY(ht, _h, _key)
 
#define ZEND_HASH_REVERSE_FOREACH_KEY(ht, _h, _key)
 
#define ZEND_HASH_FOREACH_NUM_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val)
 
#define ZEND_HASH_FOREACH_STR_KEY_VAL_FROM(ht, _key, _val, _from)
 
#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL(ht, _key, _val)
 
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_KEY_VAL(ht, _h, _key, _val)
 
#define ZEND_HASH_FOREACH_STR_KEY_VAL_IND(ht, _key, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL_IND(ht, _key, _val)
 
#define ZEND_HASH_FOREACH_KEY_VAL_IND(ht, _h, _key, _val)
 
#define ZEND_HASH_REVERSE_FOREACH_KEY_VAL_IND(ht, _h, _key, _val)
 
#define ZEND_HASH_FOREACH_NUM_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_FOREACH_STR_KEY_PTR(ht, _key, _ptr)
 
#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_PTR(ht, _key, _ptr)
 
#define ZEND_HASH_FOREACH_KEY_PTR(ht, _h, _key, _ptr)
 
#define ZEND_HASH_REVERSE_FOREACH_KEY_PTR(ht, _h, _key, _ptr)
 
#define ZEND_HASH_MAP_FOREACH_FROM(_ht, indirect, _from)
 
#define ZEND_HASH_MAP_FOREACH(_ht, indirect)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH(_ht, indirect)
 
#define ZEND_HASH_MAP_FOREACH_END_DEL()
 
#define ZEND_HASH_MAP_FOREACH_BUCKET(ht, _bucket)
 
#define ZEND_HASH_MAP_FOREACH_BUCKET_FROM(ht, _bucket, _from)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_BUCKET(ht, _bucket)
 
#define ZEND_HASH_MAP_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_MAP_FOREACH_VAL_IND(ht, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_VAL_IND(ht, _val)
 
#define ZEND_HASH_MAP_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_MAP_FOREACH_PTR_FROM(ht, _ptr, _from)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_MAP_FOREACH_NUM_KEY(ht, _h)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY(ht, _h)
 
#define ZEND_HASH_MAP_FOREACH_STR_KEY(ht, _key)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY(ht, _key)
 
#define ZEND_HASH_MAP_FOREACH_KEY(ht, _h, _key)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY(ht, _h, _key)
 
#define ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL(ht, _key, _val)
 
#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_FROM(ht, _key, _val, _from)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL(ht, _key, _val)
 
#define ZEND_HASH_MAP_FOREACH_KEY_VAL(ht, _h, _key, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL(ht, _h, _key, _val)
 
#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_IND(ht, _key, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL_IND(ht, _key, _val)
 
#define ZEND_HASH_MAP_FOREACH_KEY_VAL_IND(ht, _h, _key, _val)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL_IND(ht, _h, _key, _val)
 
#define ZEND_HASH_MAP_FOREACH_NUM_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(ht, _key, _ptr)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_PTR(ht, _key, _ptr)
 
#define ZEND_HASH_MAP_FOREACH_KEY_PTR(ht, _h, _key, _ptr)
 
#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_PTR(ht, _h, _key, _ptr)
 
#define ZEND_HASH_PACKED_FOREACH_FROM(_ht, _from)
 
#define ZEND_HASH_PACKED_FOREACH(_ht)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH(_ht)
 
#define ZEND_HASH_PACKED_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH_VAL(ht, _val)
 
#define ZEND_HASH_PACKED_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH_PTR(ht, _ptr)
 
#define ZEND_HASH_PACKED_FOREACH_KEY(ht, _h)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY(ht, _h)
 
#define ZEND_HASH_PACKED_FOREACH_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_VAL(ht, _h, _val)
 
#define ZEND_HASH_PACKED_FOREACH_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_PTR(ht, _h, _ptr)
 
#define ZEND_HASH_FILL_PACKED(ht)
 
#define ZEND_HASH_FILL_GROW()
 
#define ZEND_HASH_FILL_SET(_val)
 
#define ZEND_HASH_FILL_SET_NULL()
 
#define ZEND_HASH_FILL_SET_LONG(_val)
 
#define ZEND_HASH_FILL_SET_DOUBLE(_val)
 
#define ZEND_HASH_FILL_SET_STR(_val)
 
#define ZEND_HASH_FILL_SET_STR_COPY(_val)
 
#define ZEND_HASH_FILL_SET_INTERNED_STR(_val)
 
#define ZEND_HASH_FILL_NEXT()
 
#define ZEND_HASH_FILL_ADD(_val)
 
#define ZEND_HASH_FILL_FINISH()
 
#define ZEND_HASH_FILL_END()
 

Typedefs

typedef struct _zend_hash_key zend_hash_key
 
typedef bool(* merge_checker_func_t) (HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam)
 
typedef int(* apply_func_t) (zval *pDest)
 
typedef int(* apply_func_arg_t) (zval *pDest, void *argument)
 
typedef int(* apply_func_args_t) (zval *pDest, int num_args, va_list args, zend_hash_key *hash_key)
 
typedef int(* bucket_compare_func_t) (Bucket *a, Bucket *b)
 

Functions

ZEND_API void ZEND_FASTCALL _zend_hash_init (HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent)
 
ZEND_API void ZEND_FASTCALL zend_hash_destroy (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_clean (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_real_init (HashTable *ht, bool packed)
 
ZEND_API void ZEND_FASTCALL zend_hash_real_init_packed (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_real_init_mixed (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_to_packed (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_extend (HashTable *ht, uint32_t nSize, bool packed)
 
ZEND_API void ZEND_FASTCALL zend_hash_discard (HashTable *ht, uint32_t nNumUsed)
 
ZEND_API void ZEND_FASTCALL zend_hash_packed_grow (HashTable *ht)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_add_or_update (HashTable *ht, zend_string *key, zval *pData, uint32_t flag)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_update (HashTable *ht, zend_string *key, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_update_ind (HashTable *ht, zend_string *key, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_add (HashTable *ht, zend_string *key, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_add_new (HashTable *ht, zend_string *key, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_or_update (HashTable *ht, const char *key, size_t len, zval *pData, uint32_t flag)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_update (HashTable *ht, const char *key, size_t len, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_update_ind (HashTable *ht, const char *key, size_t len, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_add (HashTable *ht, const char *key, size_t len, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_new (HashTable *ht, const char *key, size_t len, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_or_update (HashTable *ht, zend_ulong h, zval *pData, uint32_t flag)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add (HashTable *ht, zend_ulong h, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_new (HashTable *ht, zend_ulong h, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_update (HashTable *ht, zend_ulong h, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert (HashTable *ht, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert_new (HashTable *ht, zval *pData)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_empty_element (HashTable *ht, zend_ulong h)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_add_empty_element (HashTable *ht, zend_string *key)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_empty_element (HashTable *ht, const char *key, size_t len)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_set_bucket_key (HashTable *ht, Bucket *p, zend_string *key)
 
ZEND_API void ZEND_FASTCALL zend_hash_graceful_destroy (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy (HashTable *ht)
 
ZEND_API void ZEND_FASTCALL zend_hash_apply (HashTable *ht, apply_func_t apply_func)
 
ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument (HashTable *ht, apply_func_arg_t apply_func, void *)
 
ZEND_API void zend_hash_apply_with_arguments (HashTable *ht, apply_func_args_t apply_func, int,...)
 
ZEND_API void ZEND_FASTCALL zend_hash_reverse_apply (HashTable *ht, apply_func_t apply_func)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_del (HashTable *ht, zend_string *key)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_del_ind (HashTable *ht, zend_string *key)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_str_del (HashTable *ht, const char *key, size_t len)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_str_del_ind (HashTable *ht, const char *key, size_t len)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_index_del (HashTable *ht, zend_ulong h)
 
ZEND_API void ZEND_FASTCALL zend_hash_del_bucket (HashTable *ht, Bucket *p)
 
ZEND_API void ZEND_FASTCALL zend_hash_packed_del_val (HashTable *ht, zval *zv)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_find (const HashTable *ht, zend_string *key)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find (const HashTable *ht, const char *key, size_t len)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_find (const HashTable *ht, zend_ulong h)
 
ZEND_API zval *ZEND_FASTCALL _zend_hash_index_find (const HashTable *ht, zend_ulong h)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_find_known_hash (const HashTable *ht, const zend_string *key)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_lookup (HashTable *ht, zend_string *key)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_index_lookup (HashTable *ht, zend_ulong h)
 
ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos_ex (const HashTable *ht, HashPosition pos)
 
ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos (const HashTable *ht)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_move_forward_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex (const HashTable *ht, zend_string **str_index, zend_ulong *num_index, const HashPosition *pos)
 
ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex (const HashTable *ht, zval *key, const HashPosition *pos)
 
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_get_current_data_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex (HashTable *ht, HashPosition *pos)
 
ZEND_API void ZEND_FASTCALL zend_hash_copy (HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor)
 
ZEND_API void ZEND_FASTCALL zend_hash_merge (HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite)
 
ZEND_API void ZEND_FASTCALL zend_hash_merge_ex (HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, merge_checker_func_t pMergeSource, void *pParam)
 
ZEND_API void zend_hash_bucket_swap (Bucket *p, Bucket *q)
 
ZEND_API void zend_hash_bucket_renum_swap (Bucket *p, Bucket *q)
 
ZEND_API void zend_hash_bucket_packed_swap (Bucket *p, Bucket *q)
 
ZEND_API int zend_hash_compare (HashTable *ht1, HashTable *ht2, compare_func_t compar, bool ordered)
 
ZEND_API void ZEND_FASTCALL zend_hash_sort_ex (HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber)
 
void ZEND_FASTCALL zend_array_sort_ex (HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, bool renumber)
 
ZEND_API zval *ZEND_FASTCALL zend_hash_minmax (const HashTable *ht, compare_func_t compar, uint32_t flag)
 
ZEND_API void ZEND_FASTCALL zend_hash_rehash (HashTable *ht)
 
ZEND_API HashTable *ZEND_FASTCALL _zend_new_array_0 (void)
 
ZEND_API HashTable *ZEND_FASTCALL _zend_new_array (uint32_t size)
 
ZEND_API HashTable *ZEND_FASTCALL zend_new_pair (zval *val1, zval *val2)
 
ZEND_API uint32_t zend_array_count (HashTable *ht)
 
ZEND_API HashTable *ZEND_FASTCALL zend_array_dup (HashTable *source)
 
ZEND_API void ZEND_FASTCALL zend_array_destroy (HashTable *ht)
 
ZEND_API HashTablezend_array_to_list (HashTable *source)
 
ZEND_API void ZEND_FASTCALL zend_symtable_clean (HashTable *ht)
 
ZEND_API HashTable *ZEND_FASTCALL zend_symtable_to_proptable (HashTable *ht)
 
ZEND_API HashTable *ZEND_FASTCALL zend_proptable_to_symtable (HashTable *ht, bool always_duplicate)
 
ZEND_API bool ZEND_FASTCALL _zend_handle_numeric_str_ex (const char *key, size_t length, zend_ulong *idx)
 
ZEND_API uint32_t ZEND_FASTCALL zend_hash_iterator_add (HashTable *ht, HashPosition pos)
 
ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos (uint32_t idx, HashTable *ht)
 
ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex (uint32_t idx, zval *array)
 
ZEND_API void ZEND_FASTCALL zend_hash_iterator_del (uint32_t idx)
 
ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterators_lower_pos (HashTable *ht, HashPosition start)
 
ZEND_API void ZEND_FASTCALL _zend_hash_iterators_update (HashTable *ht, HashPosition from, HashPosition to)
 
ZEND_API void ZEND_FASTCALL zend_hash_iterators_advance (HashTable *ht, HashPosition step)
 
ZEND_API voidzend_hash_str_find_ptr_lc (const HashTable *ht, const char *str, size_t len)
 
ZEND_API voidzend_hash_find_ptr_lc (const HashTable *ht, zend_string *key)
 

Variables

ZEND_API const HashTable zend_empty_array
 

Macro Definition Documentation

◆ _ZEND_HASH_FOREACH_VAL

#define _ZEND_HASH_FOREACH_VAL ( _ht)
Value:
do { \
const HashTable *__ht = (_ht); \
uint32_t _count = __ht->nNumUsed; \
size_t _size = ZEND_HASH_ELEMENT_SIZE(__ht); \
zval *_z = __ht->arPacked; \
for (; _count > 0; _z = ZEND_HASH_NEXT_ELEMENT(_z, _size), _count--) { \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
uint32_t nNumUsed
Definition zend_types.h:406
zval * arPacked
Definition zend_types.h:404
struct _zval_struct zval
#define ZEND_HASH_ELEMENT_SIZE(__ht)
Definition zend_hash.h:998
#define ZEND_HASH_NEXT_ELEMENT(_el, _size)
Definition zend_hash.h:1008
#define UNEXPECTED(condition)
#define Z_TYPE_P(zval_p)
Definition zend_types.h:660
#define IS_UNDEF
Definition zend_types.h:600
struct _zend_array HashTable
Definition zend_types.h:386

Definition at line 1014 of file zend_hash.h.

◆ _ZEND_HASH_REVERSE_FOREACH_VAL

#define _ZEND_HASH_REVERSE_FOREACH_VAL ( _ht)
Value:
do { \
const HashTable *__ht = (_ht); \
uint32_t _idx = __ht->nNumUsed; \
size_t _size = ZEND_HASH_ELEMENT_SIZE(__ht); \
zval *_z = ZEND_HASH_ELEMENT_EX(__ht, _idx, _size); \
for (;_idx > 0; _idx--) { \
_z = ZEND_HASH_PREV_ELEMENT(_z, _size); \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
#define ZEND_HASH_PREV_ELEMENT(_el, _size)
Definition zend_hash.h:1011
#define ZEND_HASH_ELEMENT_EX(__ht, _idx, _size)
Definition zend_hash.h:1002

Definition at line 1022 of file zend_hash.h.

◆ HASH_ADD

#define HASH_ADD   (1<<1)

Definition at line 34 of file zend_hash.h.

◆ HASH_ADD_NEW

#define HASH_ADD_NEW   (1<<3)

Definition at line 36 of file zend_hash.h.

◆ HASH_ADD_NEXT

#define HASH_ADD_NEXT   (1<<4)

Definition at line 37 of file zend_hash.h.

◆ HASH_FLAG_ALLOW_COW_VIOLATION

#define HASH_FLAG_ALLOW_COW_VIOLATION   (1<<6)

Definition at line 45 of file zend_hash.h.

◆ HASH_FLAG_CONSISTENCY

#define HASH_FLAG_CONSISTENCY   ((1<<0) | (1<<1))

Definition at line 40 of file zend_hash.h.

◆ HASH_FLAG_HAS_EMPTY_IND

#define HASH_FLAG_HAS_EMPTY_IND   (1<<5)

Definition at line 44 of file zend_hash.h.

◆ HASH_FLAG_MASK

#define HASH_FLAG_MASK   0xff

Definition at line 48 of file zend_hash.h.

◆ HASH_FLAG_PACKED

#define HASH_FLAG_PACKED   (1<<2)

Definition at line 41 of file zend_hash.h.

◆ HASH_FLAG_STATIC_KEYS

#define HASH_FLAG_STATIC_KEYS   (1<<4) /* long and interned strings */

Definition at line 43 of file zend_hash.h.

◆ HASH_FLAG_UNINITIALIZED

#define HASH_FLAG_UNINITIALIZED   (1<<3)

Definition at line 42 of file zend_hash.h.

◆ HASH_KEY_IS_LONG

#define HASH_KEY_IS_LONG   2

Definition at line 30 of file zend_hash.h.

◆ HASH_KEY_IS_STRING

#define HASH_KEY_IS_STRING   1

Definition at line 29 of file zend_hash.h.

◆ HASH_KEY_NON_EXISTENT

#define HASH_KEY_NON_EXISTENT   3

Definition at line 31 of file zend_hash.h.

◆ HASH_LOOKUP

#define HASH_LOOKUP   (1<<5)

Definition at line 38 of file zend_hash.h.

◆ HASH_UPDATE

#define HASH_UPDATE   (1<<0)

Definition at line 33 of file zend_hash.h.

◆ HASH_UPDATE_INDIRECT

#define HASH_UPDATE_INDIRECT   (1<<2)

Definition at line 35 of file zend_hash.h.

◆ HT_ALLOW_COW_VIOLATION

#define HT_ALLOW_COW_VIOLATION ( ht)

Definition at line 71 of file zend_hash.h.

◆ HT_DEC_ITERATORS_COUNT

#define HT_DEC_ITERATORS_COUNT ( ht)
Value:
HashTable * ht
Definition ffi.c:4838
#define HT_ITERATORS_COUNT(ht)
Definition zend_hash.h:74
#define HT_SET_ITERATORS_COUNT(ht, iters)
Definition zend_hash.h:78

Definition at line 82 of file zend_hash.h.

◆ HT_FLAGS

#define HT_FLAGS ( ht)
Value:
(ht)->u.flags
uint32_t u
Definition cdf.c:78

Definition at line 50 of file zend_hash.h.

◆ HT_HAS_ITERATORS

#define HT_HAS_ITERATORS ( ht)
Value:

Definition at line 76 of file zend_hash.h.

◆ HT_HAS_STATIC_KEYS_ONLY

#define HT_HAS_STATIC_KEYS_ONLY ( ht)
Value:
#define HASH_FLAG_STATIC_KEYS
Definition zend_hash.h:43
#define HASH_FLAG_PACKED
Definition zend_hash.h:41
#define HT_FLAGS(ht)
Definition zend_hash.h:50

Definition at line 65 of file zend_hash.h.

◆ HT_INC_ITERATORS_COUNT

#define HT_INC_ITERATORS_COUNT ( ht)
Value:

Definition at line 80 of file zend_hash.h.

◆ HT_INVALIDATE

#define HT_INVALIDATE ( ht)
Value:
do { \
HT_FLAGS(ht) = HASH_FLAG_UNINITIALIZED; \
} while (0)
#define HASH_FLAG_UNINITIALIZED
Definition zend_hash.h:42

Definition at line 52 of file zend_hash.h.

◆ HT_IS_INITIALIZED

#define HT_IS_INITIALIZED ( ht)
Value:

Definition at line 56 of file zend_hash.h.

◆ HT_IS_PACKED

#define HT_IS_PACKED ( ht)
Value:

Definition at line 59 of file zend_hash.h.

◆ HT_IS_WITHOUT_HOLES

#define HT_IS_WITHOUT_HOLES ( ht)
Value:
((ht)->nNumUsed == (ht)->nNumOfElements)

Definition at line 62 of file zend_hash.h.

◆ HT_ITERATORS_COUNT

#define HT_ITERATORS_COUNT ( ht)
Value:
(ht)->u.v.nIteratorsCount

Definition at line 74 of file zend_hash.h.

◆ HT_ITERATORS_OVERFLOW

#define HT_ITERATORS_OVERFLOW ( ht)
Value:

Definition at line 75 of file zend_hash.h.

◆ HT_SET_ITERATORS_COUNT

#define HT_SET_ITERATORS_COUNT ( ht,
iters )
Value:
do { HT_ITERATORS_COUNT(ht) = (iters); } while (0)

Definition at line 78 of file zend_hash.h.

◆ ZEND_HANDLE_NUMERIC

#define ZEND_HANDLE_NUMERIC ( key,
idx )
Value:
unsigned char key[REFLECTION_KEY_LEN]
#define ZEND_HANDLE_NUMERIC_STR(key, length, idx)
Definition zend_hash.h:417
#define ZSTR_VAL(zstr)
Definition zend_string.h:68
#define ZSTR_LEN(zstr)
Definition zend_string.h:69

Definition at line 420 of file zend_hash.h.

◆ ZEND_HANDLE_NUMERIC_STR

#define ZEND_HANDLE_NUMERIC_STR ( key,
length,
idx )
Value:
_zend_handle_numeric_str(key, length, &idx)

Definition at line 417 of file zend_hash.h.

◆ ZEND_HASH_APPLY_KEEP

#define ZEND_HASH_APPLY_KEEP   0

Definition at line 146 of file zend_hash.h.

◆ ZEND_HASH_APPLY_REMOVE

#define ZEND_HASH_APPLY_REMOVE   1<<0

Definition at line 147 of file zend_hash.h.

◆ ZEND_HASH_APPLY_STOP

#define ZEND_HASH_APPLY_STOP   1<<1

Definition at line 148 of file zend_hash.h.

◆ ZEND_HASH_ELEMENT

#define ZEND_HASH_ELEMENT ( __ht,
_idx )
Value:

Definition at line 1005 of file zend_hash.h.

◆ ZEND_HASH_ELEMENT_EX

#define ZEND_HASH_ELEMENT_EX ( __ht,
_idx,
_size )
Value:
((zval*)(((char*)(__ht)->arPacked) + ((_idx) * (_size))))

Definition at line 1002 of file zend_hash.h.

◆ ZEND_HASH_ELEMENT_SIZE

#define ZEND_HASH_ELEMENT_SIZE ( __ht)
Value:
(sizeof(zval) + (~HT_FLAGS(__ht) & HASH_FLAG_PACKED) * ((sizeof(Bucket)-sizeof(zval))/HASH_FLAG_PACKED))
struct _Bucket Bucket

Definition at line 998 of file zend_hash.h.

◆ ZEND_HASH_FILL_ADD

#define ZEND_HASH_FILL_ADD ( _val)
Value:
do { \
ZEND_HASH_FILL_SET(_val); \
ZEND_HASH_FILL_NEXT(); \
} while (0)

Definition at line 1570 of file zend_hash.h.

◆ ZEND_HASH_FILL_END

#define ZEND_HASH_FILL_END ( )
Value:
} while (0)
#define ZEND_HASH_FILL_FINISH()
Definition zend_hash.h:1575

Definition at line 1582 of file zend_hash.h.

◆ ZEND_HASH_FILL_FINISH

#define ZEND_HASH_FILL_FINISH ( )
Value:
do { \
__fill_ht->nNumOfElements += __fill_idx - __fill_ht->nNumUsed; \
__fill_ht->nNumUsed = __fill_idx; \
__fill_ht->nNextFreeElement = __fill_idx; \
__fill_ht->nInternalPointer = 0; \
} while (0)

Definition at line 1575 of file zend_hash.h.

◆ ZEND_HASH_FILL_GROW

#define ZEND_HASH_FILL_GROW ( )
Value:
do { \
if (UNEXPECTED(__fill_idx >= __fill_ht->nTableSize)) { \
__fill_ht->nNumOfElements += __fill_idx - __fill_ht->nNumUsed; \
__fill_ht->nNumUsed = __fill_idx; \
__fill_ht->nNextFreeElement = __fill_idx; \
zend_hash_packed_grow(__fill_ht); \
__fill_val = __fill_ht->arPacked + __fill_idx; \
} \
} while (0);

Definition at line 1534 of file zend_hash.h.

◆ ZEND_HASH_FILL_NEXT

#define ZEND_HASH_FILL_NEXT ( )
Value:
do {\
__fill_val++; \
__fill_idx++; \
} while (0)

Definition at line 1565 of file zend_hash.h.

◆ ZEND_HASH_FILL_PACKED

#define ZEND_HASH_FILL_PACKED ( ht)
Value:
do { \
HashTable *__fill_ht = (ht); \
zval *__fill_val = __fill_ht->arPacked + __fill_ht->nNumUsed; \
uint32_t __fill_idx = __fill_ht->nNumUsed; \
ZEND_ASSERT(HT_IS_PACKED(__fill_ht));
#define HT_IS_PACKED(ht)
Definition zend_hash.h:59

Definition at line 1528 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET

#define ZEND_HASH_FILL_SET ( _val)
Value:
ZVAL_COPY_VALUE(__fill_val, _val)
#define ZVAL_COPY_VALUE(z, v)

Definition at line 1544 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_DOUBLE

#define ZEND_HASH_FILL_SET_DOUBLE ( _val)
Value:
ZVAL_DOUBLE(__fill_val, _val)
#define ZVAL_DOUBLE(z, d)

Definition at line 1553 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_INTERNED_STR

#define ZEND_HASH_FILL_SET_INTERNED_STR ( _val)
Value:
ZVAL_INTERNED_STR(__fill_val, _val)
#define ZVAL_INTERNED_STR(z, s)

Definition at line 1562 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_LONG

#define ZEND_HASH_FILL_SET_LONG ( _val)
Value:
ZVAL_LONG(__fill_val, _val)
#define ZVAL_LONG(z, l)

Definition at line 1550 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_NULL

#define ZEND_HASH_FILL_SET_NULL ( )
Value:
ZVAL_NULL(__fill_val)
#define ZVAL_NULL(z)

Definition at line 1547 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_STR

#define ZEND_HASH_FILL_SET_STR ( _val)
Value:
ZVAL_STR(__fill_val, _val)
#define ZVAL_STR(z, s)

Definition at line 1556 of file zend_hash.h.

◆ ZEND_HASH_FILL_SET_STR_COPY

#define ZEND_HASH_FILL_SET_STR_COPY ( _val)
Value:
ZVAL_STR_COPY(__fill_val, _val)
#define ZVAL_STR_COPY(z, s)

Definition at line 1559 of file zend_hash.h.

◆ ZEND_HASH_FOREACH

#define ZEND_HASH_FOREACH ( _ht,
indirect )
Value:
ZEND_HASH_FOREACH_FROM(_ht, indirect, 0)
#define ZEND_HASH_FOREACH_FROM(_ht, indirect, _from)
Definition zend_hash.h:1031

Definition at line 1057 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_BUCKET

#define ZEND_HASH_FOREACH_BUCKET ( ht,
_bucket )
Value:
#define ZEND_HASH_MAP_FOREACH_BUCKET(ht, _bucket)
Definition zend_hash.h:1298

Definition at line 1093 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_BUCKET_FROM

#define ZEND_HASH_FOREACH_BUCKET_FROM ( ht,
_bucket,
_from )
Value:
#define ZEND_HASH_MAP_FOREACH_BUCKET_FROM(ht, _bucket, _from)
Definition zend_hash.h:1302

Definition at line 1096 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_END

ZEND_HASH_FOREACH_END ( )
Value:
} \
} while (0)

Definition at line 1086 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_END_DEL

#define ZEND_HASH_FOREACH_END_DEL ( )
Value:
#define ZEND_HASH_MAP_FOREACH_END_DEL()
Definition zend_hash.h:1276

Definition at line 1090 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_FROM

#define ZEND_HASH_FOREACH_FROM ( _ht,
indirect,
_from )
Value:
do { \
const HashTable *__ht = (_ht); \
zend_ulong __h; \
zend_string *__key = NULL; \
uint32_t _idx = (_from); \
size_t _size = ZEND_HASH_ELEMENT_SIZE(__ht); \
zval *__z = ZEND_HASH_ELEMENT_EX(__ht, _idx, _size); \
uint32_t _count = __ht->nNumUsed - _idx; \
for (;_count > 0; _count--) { \
zval *_z = __z; \
if (HT_IS_PACKED(__ht)) { \
__z++; \
__h = _idx; \
_idx++; \
} else { \
Bucket *_p = (Bucket*)__z; \
__z = &(_p + 1)->val; \
__h = _p->h; \
__key = _p->key; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
} \
(void) __h; (void) __key; (void) _idx; \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
zval * val
Definition ffi.c:4262
#define NULL
Definition gdcache.h:45
zend_ulong h
Definition zend_types.h:382
zend_string * key
Definition zend_types.h:383
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
uint32_t zend_ulong
Definition zend_long.h:43
struct _zend_string zend_string
#define Z_INDIRECT_P(zval_p)
#define IS_INDIRECT
Definition zend_types.h:623

Definition at line 1031 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_KEY

#define ZEND_HASH_FOREACH_KEY ( ht,
_h,
_key )
Value:
_h = __h; \
_key = __key;
#define ZEND_HASH_FOREACH(_ht, indirect)
Definition zend_hash.h:1057

Definition at line 1146 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_KEY_PTR

#define ZEND_HASH_FOREACH_KEY_PTR ( ht,
_h,
_key,
_ptr )
Value:
_h = __h; \
_key = __key; \
_ptr = Z_PTR_P(_z);
#define Z_PTR_P(zval_p)

Definition at line 1235 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_KEY_VAL

#define ZEND_HASH_FOREACH_KEY_VAL ( ht,
_h,
_key,
_val )
Value:
_h = __h; \
_key = __key; \
_val = _z;

Definition at line 1181 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_KEY_VAL_IND

#define ZEND_HASH_FOREACH_KEY_VAL_IND ( ht,
_h,
_key,
_val )
Value:
_h = __h; \
_key = __key; \
_val = _z;

Definition at line 1203 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_NUM_KEY

#define ZEND_HASH_FOREACH_NUM_KEY ( ht,
_h )
Value:
_h = __h;

Definition at line 1130 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_NUM_KEY_PTR

#define ZEND_HASH_FOREACH_NUM_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = __h; \
_ptr = Z_PTR_P(_z);

Definition at line 1215 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_NUM_KEY_VAL

#define ZEND_HASH_FOREACH_NUM_KEY_VAL ( ht,
_h,
_val )
Value:
_h = __h; \
_val = _z;

Definition at line 1156 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_PTR

#define ZEND_HASH_FOREACH_PTR ( ht,
_ptr )
Value:
_ptr = Z_PTR_P(_z);
#define _ZEND_HASH_FOREACH_VAL(_ht)
Definition zend_hash.h:1014

Definition at line 1118 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_PTR_FROM

#define ZEND_HASH_FOREACH_PTR_FROM ( ht,
_ptr,
_from )
Value:
ZEND_HASH_FOREACH_FROM(ht, 0, _from); \
_ptr = Z_PTR_P(_z);

Definition at line 1122 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_STR_KEY

#define ZEND_HASH_FOREACH_STR_KEY ( ht,
_key )
Value:
_key = __key;

Definition at line 1138 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_STR_KEY_PTR

#define ZEND_HASH_FOREACH_STR_KEY_PTR ( ht,
_key,
_ptr )
Value:
_key = __key; \
_ptr = Z_PTR_P(_z);

Definition at line 1225 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_STR_KEY_VAL

#define ZEND_HASH_FOREACH_STR_KEY_VAL ( ht,
_key,
_val )
Value:
_key = __key; \
_val = _z;

Definition at line 1166 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_STR_KEY_VAL_FROM

#define ZEND_HASH_FOREACH_STR_KEY_VAL_FROM ( ht,
_key,
_val,
_from )
Value:
ZEND_HASH_FOREACH_FROM(ht, 0, _from); \
_key = __key; \
_val = _z;

Definition at line 1171 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_STR_KEY_VAL_IND

#define ZEND_HASH_FOREACH_STR_KEY_VAL_IND ( ht,
_key,
_val )
Value:
_key = __key; \
_val = _z;

Definition at line 1193 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_VAL

#define ZEND_HASH_FOREACH_VAL ( ht,
_val )
Value:
_val = _z;

Definition at line 1102 of file zend_hash.h.

◆ ZEND_HASH_FOREACH_VAL_IND

#define ZEND_HASH_FOREACH_VAL_IND ( ht,
_val )
Value:
_val = _z;

Definition at line 1110 of file zend_hash.h.

◆ zend_hash_get_current_data_ptr

#define zend_hash_get_current_data_ptr ( ht)
Value:
zend_hash_get_current_data_ptr_ex(ht, &(ht)->nInternalPointer)

Definition at line 990 of file zend_hash.h.

◆ ZEND_HASH_INDEX_FIND

#define ZEND_HASH_INDEX_FIND ( _ht,
_h,
_ret,
_not_found )
Value:
do { \
if (EXPECTED(HT_IS_PACKED(_ht))) { \
if (EXPECTED((zend_ulong)(_h) < (zend_ulong)(_ht)->nNumUsed)) { \
_ret = &_ht->arPacked[_h]; \
if (UNEXPECTED(Z_TYPE_P(_ret) == IS_UNDEF)) { \
goto _not_found; \
} \
} else { \
goto _not_found; \
} \
} else { \
_ret = _zend_hash_index_find(_ht, _h); \
if (UNEXPECTED(_ret == NULL)) { \
goto _not_found; \
} \
} \
} while (0)
ZEND_API zval *ZEND_FASTCALL _zend_hash_index_find(const HashTable *ht, zend_ulong h)
Definition zend_hash.c:2722
#define EXPECTED(condition)

Definition at line 196 of file zend_hash.h.

◆ ZEND_HASH_INDEX_LOOKUP

#define ZEND_HASH_INDEX_LOOKUP ( _ht,
_h,
_ret )
Value:
do { \
if (EXPECTED(HT_IS_PACKED(_ht))) { \
if (EXPECTED((zend_ulong)(_h) < (zend_ulong)(_ht)->nNumUsed)) { \
_ret = &_ht->arPacked[_h]; \
if (EXPECTED(Z_TYPE_P(_ret) != IS_UNDEF)) { \
break; \
} \
} \
} \
_ret = zend_hash_index_lookup(_ht, _h); \
} while (0)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_lookup(HashTable *ht, zend_ulong h)
Definition zend_hash.c:1234

Definition at line 219 of file zend_hash.h.

◆ zend_hash_init

#define zend_hash_init ( ht,
nSize,
pHashFunction,
pDestructor,
persistent )
Value:
_zend_hash_init((ht), (nSize), (pDestructor), (persistent))
ffi persistent
Definition ffi.c:3633
ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent)
Definition zend_hash.c:277

Definition at line 108 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH

#define ZEND_HASH_MAP_FOREACH ( _ht,
indirect )
Value:
ZEND_HASH_MAP_FOREACH_FROM(_ht, indirect, 0)
#define ZEND_HASH_MAP_FOREACH_FROM(_ht, indirect, _from)
Definition zend_hash.h:1248

Definition at line 1260 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_BUCKET

#define ZEND_HASH_MAP_FOREACH_BUCKET ( ht,
_bucket )
Value:
_bucket = _p;
#define ZEND_HASH_MAP_FOREACH(_ht, indirect)
Definition zend_hash.h:1260

Definition at line 1298 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_BUCKET_FROM

#define ZEND_HASH_MAP_FOREACH_BUCKET_FROM ( ht,
_bucket,
_from )
Value:
_bucket = _p;

Definition at line 1302 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_END_DEL

#define ZEND_HASH_MAP_FOREACH_END_DEL ( )
Value:
__ht->nNumOfElements--; \
do { \
uint32_t j = HT_IDX_TO_HASH(_idx - 1); \
uint32_t nIndex = _p->h | __ht->nTableMask; \
uint32_t i = HT_HASH(__ht, nIndex); \
if (UNEXPECTED(j != i)) { \
Bucket *prev = HT_HASH_TO_BUCKET(__ht, i); \
while (Z_NEXT(prev->val) != j) { \
i = Z_NEXT(prev->val); \
prev = HT_HASH_TO_BUCKET(__ht, i); \
} \
Z_NEXT(prev->val) = Z_NEXT(_p->val); \
} else { \
HT_HASH(__ht, nIndex) = Z_NEXT(_p->val); \
} \
} while (0); \
} \
__ht->nNumUsed = _idx; \
} while (0)
prev(array|object &$array)
again j
#define ZEND_ASSERT(c)
#define HT_HASH(ht, idx)
Definition zend_types.h:463
#define HT_HASH_TO_BUCKET(ht, idx)
Definition zend_types.h:539
#define Z_NEXT(zval)
Definition zend_types.h:671

Definition at line 1276 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_FROM

#define ZEND_HASH_MAP_FOREACH_FROM ( _ht,
indirect,
_from )
Value:
do { \
const HashTable *__ht = (_ht); \
Bucket *_p = __ht->arData + (_from); \
const Bucket *_end = __ht->arData + __ht->nNumUsed; \
ZEND_ASSERT(!HT_IS_PACKED(__ht)); \
for (; _p != _end; _p++) { \
zval *_z = &_p->val; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
zval val
Definition zend_types.h:381
Bucket * arData
Definition zend_types.h:403

Definition at line 1248 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_KEY

#define ZEND_HASH_MAP_FOREACH_KEY ( ht,
_h,
_key )
Value:
_h = _p->h; \
_key = _p->key;

Definition at line 1354 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_KEY_PTR

#define ZEND_HASH_MAP_FOREACH_KEY_PTR ( ht,
_h,
_key,
_ptr )
Value:
_h = _p->h; \
_key = _p->key; \
_ptr = Z_PTR_P(_z);

Definition at line 1443 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_KEY_VAL

#define ZEND_HASH_MAP_FOREACH_KEY_VAL ( ht,
_h,
_key,
_val )
Value:
_h = _p->h; \
_key = _p->key; \
_val = _z;

Definition at line 1389 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_KEY_VAL_IND

#define ZEND_HASH_MAP_FOREACH_KEY_VAL_IND ( ht,
_h,
_key,
_val )
Value:
_h = _p->h; \
_key = _p->key; \
_val = _z;

Definition at line 1411 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_NUM_KEY

#define ZEND_HASH_MAP_FOREACH_NUM_KEY ( ht,
_h )
Value:
_h = _p->h;

Definition at line 1338 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_NUM_KEY_PTR

#define ZEND_HASH_MAP_FOREACH_NUM_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = _p->h; \
_ptr = Z_PTR_P(_z);

Definition at line 1423 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL

#define ZEND_HASH_MAP_FOREACH_NUM_KEY_VAL ( ht,
_h,
_val )
Value:
_h = _p->h; \
_val = _z;

Definition at line 1364 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_PTR

#define ZEND_HASH_MAP_FOREACH_PTR ( ht,
_ptr )
Value:
_ptr = Z_PTR_P(_z);

Definition at line 1326 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_PTR_FROM

#define ZEND_HASH_MAP_FOREACH_PTR_FROM ( ht,
_ptr,
_from )
Value:
_ptr = Z_PTR_P(_z);

Definition at line 1330 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_STR_KEY

#define ZEND_HASH_MAP_FOREACH_STR_KEY ( ht,
_key )
Value:
_key = _p->key;

Definition at line 1346 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_STR_KEY_PTR

#define ZEND_HASH_MAP_FOREACH_STR_KEY_PTR ( ht,
_key,
_ptr )
Value:
_key = _p->key; \
_ptr = Z_PTR_P(_z);

Definition at line 1433 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_STR_KEY_VAL

#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL ( ht,
_key,
_val )
Value:
_key = _p->key; \
_val = _z;

Definition at line 1374 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_FROM

#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_FROM ( ht,
_key,
_val,
_from )
Value:
_key = _p->key; \
_val = _z;

Definition at line 1379 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_IND

#define ZEND_HASH_MAP_FOREACH_STR_KEY_VAL_IND ( ht,
_key,
_val )
Value:
_key = _p->key; \
_val = _z;

Definition at line 1401 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_VAL

#define ZEND_HASH_MAP_FOREACH_VAL ( ht,
_val )
Value:
_val = _z;

Definition at line 1310 of file zend_hash.h.

◆ ZEND_HASH_MAP_FOREACH_VAL_IND

#define ZEND_HASH_MAP_FOREACH_VAL_IND ( ht,
_val )
Value:
_val = _z;

Definition at line 1318 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH

#define ZEND_HASH_MAP_REVERSE_FOREACH ( _ht,
indirect )
Value:
do { \
/* const */ HashTable *__ht = (_ht); \
uint32_t _idx = __ht->nNumUsed; \
Bucket *_p = __ht->arData + _idx; \
zval *_z; \
ZEND_ASSERT(!HT_IS_PACKED(__ht)); \
for (_idx = __ht->nNumUsed; _idx > 0; _idx--) { \
_p--; \
_z = &_p->val; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;

Definition at line 1262 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_BUCKET

#define ZEND_HASH_MAP_REVERSE_FOREACH_BUCKET ( ht,
_bucket )
Value:
_bucket = _p;
#define ZEND_HASH_MAP_REVERSE_FOREACH(_ht, indirect)
Definition zend_hash.h:1262

Definition at line 1306 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_KEY

#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY ( ht,
_h,
_key )
Value:
_h = _p->h; \
_key = _p->key;

Definition at line 1359 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_KEY_PTR

#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_PTR ( ht,
_h,
_key,
_ptr )
Value:
_h = _p->h; \
_key = _p->key; \
_ptr = Z_PTR_P(_z);

Definition at line 1449 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL

#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL ( ht,
_h,
_key,
_val )
Value:
_h = _p->h; \
_key = _p->key; \
_val = _z;

Definition at line 1395 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL_IND

#define ZEND_HASH_MAP_REVERSE_FOREACH_KEY_VAL_IND ( ht,
_h,
_key,
_val )
Value:
_h = _p->h; \
_key = _p->key; \
_val = _z;

Definition at line 1417 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY

#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY ( ht,
_h )
Value:
_h = _p->h;

Definition at line 1342 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_PTR

#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = _p->h; \
_ptr = Z_PTR_P(_z);

Definition at line 1428 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_VAL

#define ZEND_HASH_MAP_REVERSE_FOREACH_NUM_KEY_VAL ( ht,
_h,
_val )
Value:
_h = _p->h; \
_val = _z;

Definition at line 1369 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_PTR

#define ZEND_HASH_MAP_REVERSE_FOREACH_PTR ( ht,
_ptr )
Value:

Definition at line 1334 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY

#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY ( ht,
_key )
Value:
_key = _p->key;

Definition at line 1350 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_PTR

#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_PTR ( ht,
_key,
_ptr )
Value:
_key = _p->key; \
_ptr = Z_PTR_P(_z);

Definition at line 1438 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL

#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL ( ht,
_key,
_val )
Value:
_key = _p->key; \
_val = _z;

Definition at line 1384 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL_IND

#define ZEND_HASH_MAP_REVERSE_FOREACH_STR_KEY_VAL_IND ( ht,
_key,
_val )
Value:
_key = _p->key; \
_val = _z;

Definition at line 1406 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_VAL

#define ZEND_HASH_MAP_REVERSE_FOREACH_VAL ( ht,
_val )
Value:
_val = _z;

Definition at line 1314 of file zend_hash.h.

◆ ZEND_HASH_MAP_REVERSE_FOREACH_VAL_IND

#define ZEND_HASH_MAP_REVERSE_FOREACH_VAL_IND ( ht,
_val )
Value:
_val = _z;

Definition at line 1322 of file zend_hash.h.

◆ ZEND_HASH_NEXT_ELEMENT

#define ZEND_HASH_NEXT_ELEMENT ( _el,
_size )
Value:
((zval*)(((char*)(_el)) + (_size)))

Definition at line 1008 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH

#define ZEND_HASH_PACKED_FOREACH ( _ht)
Value:
#define ZEND_HASH_PACKED_FOREACH_FROM(_ht, _from)
Definition zend_hash.h:1456

Definition at line 1466 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_FROM

#define ZEND_HASH_PACKED_FOREACH_FROM ( _ht,
_from )
Value:
do { \
const HashTable *__ht = (_ht); \
zend_ulong _idx = (_from); \
zval *_z = __ht->arPacked + (_from); \
zval *_end = __ht->arPacked + __ht->nNumUsed; \
ZEND_ASSERT(HT_IS_PACKED(__ht)); \
for (;_z != _end; _z++, _idx++) { \
(void) _idx; \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;

Definition at line 1456 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_KEY

#define ZEND_HASH_PACKED_FOREACH_KEY ( ht,
_h )
Value:
_h = _idx;
#define ZEND_HASH_PACKED_FOREACH(_ht)
Definition zend_hash.h:1466

Definition at line 1495 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_KEY_PTR

#define ZEND_HASH_PACKED_FOREACH_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = _idx; \
_ptr = Z_PTR_P(_z);

Definition at line 1513 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_KEY_VAL

#define ZEND_HASH_PACKED_FOREACH_KEY_VAL ( ht,
_h,
_val )
Value:
_h = _idx; \
_val = _z;

Definition at line 1503 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_PTR

#define ZEND_HASH_PACKED_FOREACH_PTR ( ht,
_ptr )
Value:

Definition at line 1487 of file zend_hash.h.

◆ ZEND_HASH_PACKED_FOREACH_VAL

#define ZEND_HASH_PACKED_FOREACH_VAL ( ht,
_val )
Value:
_val = _z;

Definition at line 1479 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH

#define ZEND_HASH_PACKED_REVERSE_FOREACH ( _ht)
Value:
do { \
const HashTable *__ht = (_ht); \
zend_ulong _idx = __ht->nNumUsed; \
zval *_z = __ht->arPacked + _idx; \
ZEND_ASSERT(HT_IS_PACKED(__ht)); \
while (_idx > 0) { \
_z--; \
_idx--; \
(void) _idx; \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;

Definition at line 1468 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH_KEY

#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY ( ht,
_h )
Value:
_h = _idx;
#define ZEND_HASH_PACKED_REVERSE_FOREACH(_ht)
Definition zend_hash.h:1468

Definition at line 1499 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_PTR

#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = _idx; \
_ptr = Z_PTR_P(_z);

Definition at line 1518 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_VAL

#define ZEND_HASH_PACKED_REVERSE_FOREACH_KEY_VAL ( ht,
_h,
_val )
Value:
_h = _idx; \
_val = _z;

Definition at line 1508 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH_PTR

#define ZEND_HASH_PACKED_REVERSE_FOREACH_PTR ( ht,
_ptr )
Value:

Definition at line 1491 of file zend_hash.h.

◆ ZEND_HASH_PACKED_REVERSE_FOREACH_VAL

#define ZEND_HASH_PACKED_REVERSE_FOREACH_VAL ( ht,
_val )
Value:

Definition at line 1483 of file zend_hash.h.

◆ ZEND_HASH_PREV_ELEMENT

#define ZEND_HASH_PREV_ELEMENT ( _el,
_size )
Value:
((zval*)(((char*)(_el)) - (_size)))

Definition at line 1011 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH

#define ZEND_HASH_REVERSE_FOREACH ( _ht,
indirect )
Value:
do { \
const HashTable *__ht = (_ht); \
uint32_t _idx = __ht->nNumUsed; \
zval *_z; \
zend_ulong __h; \
zend_string *__key = NULL; \
size_t _size = ZEND_HASH_ELEMENT_SIZE(__ht); \
zval *__z = ZEND_HASH_ELEMENT_EX(__ht, _idx, _size); \
for (;_idx > 0; _idx--) { \
if (HT_IS_PACKED(__ht)) { \
__z--; \
_z = __z; \
__h = _idx - 1; \
} else { \
Bucket *_p = (Bucket*)__z; \
_p--; \
__z = &_p->val; \
_z = __z; \
__h = _p->h; \
__key = _p->key; \
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
} \
(void) __h; (void) __key; (void) __z; \
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;

Definition at line 1059 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_BUCKET

#define ZEND_HASH_REVERSE_FOREACH_BUCKET ( ht,
_bucket )
Value:
#define ZEND_HASH_MAP_REVERSE_FOREACH_BUCKET(ht, _bucket)
Definition zend_hash.h:1306

Definition at line 1099 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_KEY

#define ZEND_HASH_REVERSE_FOREACH_KEY ( ht,
_h,
_key )
Value:
_h = __h; \
_key = __key;
#define ZEND_HASH_REVERSE_FOREACH(_ht, indirect)
Definition zend_hash.h:1059

Definition at line 1151 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_KEY_PTR

#define ZEND_HASH_REVERSE_FOREACH_KEY_PTR ( ht,
_h,
_key,
_ptr )
Value:
_h = __h; \
_key = __key; \
_ptr = Z_PTR_P(_z);

Definition at line 1241 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_KEY_VAL

#define ZEND_HASH_REVERSE_FOREACH_KEY_VAL ( ht,
_h,
_key,
_val )
Value:
_h = __h; \
_key = __key; \
_val = _z;

Definition at line 1187 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_KEY_VAL_IND

#define ZEND_HASH_REVERSE_FOREACH_KEY_VAL_IND ( ht,
_h,
_key,
_val )
Value:
_h = __h; \
_key = __key; \
_val = _z;

Definition at line 1209 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_NUM_KEY

#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY ( ht,
_h )
Value:
_h = __h;

Definition at line 1134 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_NUM_KEY_PTR

#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY_PTR ( ht,
_h,
_ptr )
Value:
_h = __h; \
_ptr = Z_PTR_P(_z);

Definition at line 1220 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_NUM_KEY_VAL

#define ZEND_HASH_REVERSE_FOREACH_NUM_KEY_VAL ( ht,
_h,
_val )
Value:
_h = __h; \
_val = _z;

Definition at line 1161 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_PTR

#define ZEND_HASH_REVERSE_FOREACH_PTR ( ht,
_ptr )
Value:
_ptr = Z_PTR_P(_z);
#define _ZEND_HASH_REVERSE_FOREACH_VAL(_ht)
Definition zend_hash.h:1022

Definition at line 1126 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_STR_KEY

#define ZEND_HASH_REVERSE_FOREACH_STR_KEY ( ht,
_key )
Value:
_key = __key;

Definition at line 1142 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_STR_KEY_PTR

#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_PTR ( ht,
_key,
_ptr )
Value:
_key = __key; \
_ptr = Z_PTR_P(_z);

Definition at line 1230 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL

#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL ( ht,
_key,
_val )
Value:
_key = __key; \
_val = _z;

Definition at line 1176 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL_IND

#define ZEND_HASH_REVERSE_FOREACH_STR_KEY_VAL_IND ( ht,
_key,
_val )
Value:
_key = __key; \
_val = _z;

Definition at line 1198 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_VAL

#define ZEND_HASH_REVERSE_FOREACH_VAL ( ht,
_val )
Value:

Definition at line 1106 of file zend_hash.h.

◆ ZEND_HASH_REVERSE_FOREACH_VAL_IND

#define ZEND_HASH_REVERSE_FOREACH_VAL_IND ( ht,
_val )
Value:
_val = _z;

Definition at line 1114 of file zend_hash.h.

◆ ZEND_INIT_SYMTABLE

#define ZEND_INIT_SYMTABLE ( ht)
Value:
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent)
Definition zend_hash.h:396

Definition at line 393 of file zend_hash.h.

◆ ZEND_INIT_SYMTABLE_EX

#define ZEND_INIT_SYMTABLE_EX ( ht,
n,
persistent )
Value:
zend_long n
Definition ffi.c:4979
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent)
Definition zend_hash.h:108
#define ZVAL_PTR_DTOR

Definition at line 396 of file zend_hash.h.

◆ zend_new_array

#define zend_new_array ( size)
Value:
new_type size
Definition ffi.c:4365
ZEND_API HashTable *ZEND_FASTCALL _zend_new_array(uint32_t nSize)
Definition zend_hash.c:289

Definition at line 338 of file zend_hash.h.

◆ ZVAL_EMPTY_ARRAY

#define ZVAL_EMPTY_ARRAY ( z)
Value:
do { \
zval *__z = (z); \
Z_ARR_P(__z) = (zend_array*)&zend_empty_array; \
Z_TYPE_INFO_P(__z) = IS_ARRAY; \
} while (0)
ZEND_API const HashTable zend_empty_array
Definition zend_hash.c:248
struct _zend_array zend_array
#define IS_ARRAY
Definition zend_types.h:607

Definition at line 87 of file zend_hash.h.

Typedef Documentation

◆ apply_func_arg_t

typedef int(* apply_func_arg_t) (zval *pDest, void *argument)

Definition at line 151 of file zend_hash.h.

◆ apply_func_args_t

typedef int(* apply_func_args_t) (zval *pDest, int num_args, va_list args, zend_hash_key *hash_key)

Definition at line 152 of file zend_hash.h.

◆ apply_func_t

typedef int(* apply_func_t) (zval *pDest)

Definition at line 150 of file zend_hash.h.

◆ bucket_compare_func_t

typedef int(* bucket_compare_func_t) (Bucket *a, Bucket *b)

Definition at line 299 of file zend_hash.h.

◆ merge_checker_func_t

typedef bool(* merge_checker_func_t) (HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam)

Definition at line 99 of file zend_hash.h.

◆ zend_hash_key

typedef struct _zend_hash_key zend_hash_key

Function Documentation

◆ _zend_handle_numeric_str_ex()

ZEND_API bool ZEND_FASTCALL _zend_handle_numeric_str_ex ( const char * key,
size_t length,
zend_ulong * idx )

Definition at line 3291 of file zend_hash.c.

◆ _zend_hash_index_find()

ZEND_API zval *ZEND_FASTCALL _zend_hash_index_find ( const HashTable * ht,
zend_ulong h )

Definition at line 2722 of file zend_hash.c.

◆ _zend_hash_init()

ZEND_API void ZEND_FASTCALL _zend_hash_init ( HashTable * ht,
uint32_t nSize,
dtor_func_t pDestructor,
bool persistent )

Definition at line 277 of file zend_hash.c.

◆ _zend_hash_iterators_update()

ZEND_API void ZEND_FASTCALL _zend_hash_iterators_update ( HashTable * ht,
HashPosition from,
HashPosition to )

Definition at line 711 of file zend_hash.c.

◆ _zend_new_array()

ZEND_API HashTable *ZEND_FASTCALL _zend_new_array ( uint32_t size)

Definition at line 289 of file zend_hash.c.

◆ _zend_new_array_0()

ZEND_API HashTable *ZEND_FASTCALL _zend_new_array_0 ( void )

Definition at line 282 of file zend_hash.c.

◆ zend_array_count()

ZEND_API uint32_t zend_array_count ( HashTable * ht)

Definition at line 476 of file zend_hash.c.

◆ zend_array_destroy()

ZEND_API void ZEND_FASTCALL zend_array_destroy ( HashTable * ht)

Definition at line 1808 of file zend_hash.c.

◆ zend_array_dup()

ZEND_API HashTable *ZEND_FASTCALL zend_array_dup ( HashTable * source)

Definition at line 2438 of file zend_hash.c.

◆ zend_array_sort_ex()

void ZEND_FASTCALL zend_array_sort_ex ( HashTable * ht,
sort_func_t sort_func,
bucket_compare_func_t compare_func,
bool renumber )

Definition at line 3074 of file zend_hash.c.

◆ zend_array_to_list()

ZEND_API HashTable * zend_array_to_list ( HashTable * source)

Definition at line 2526 of file zend_hash.c.

◆ zend_hash_add()

ZEND_API zval *ZEND_FASTCALL zend_hash_add ( HashTable * ht,
zend_string * key,
zval * pData )

Definition at line 992 of file zend_hash.c.

◆ zend_hash_add_empty_element()

ZEND_API zval *ZEND_FASTCALL zend_hash_add_empty_element ( HashTable * ht,
zend_string * key )

Definition at line 1067 of file zend_hash.c.

◆ zend_hash_add_new()

ZEND_API zval *ZEND_FASTCALL zend_hash_add_new ( HashTable * ht,
zend_string * key,
zval * pData )

Definition at line 1007 of file zend_hash.c.

◆ zend_hash_add_or_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_add_or_update ( HashTable * ht,
zend_string * key,
zval * pData,
uint32_t flag )

Definition at line 978 of file zend_hash.c.

◆ zend_hash_apply()

ZEND_API void ZEND_FASTCALL zend_hash_apply ( HashTable * ht,
apply_func_t apply_func )

Definition at line 2059 of file zend_hash.c.

◆ zend_hash_apply_with_argument()

ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument ( HashTable * ht,
apply_func_arg_t apply_func,
void * argument )

Definition at line 2099 of file zend_hash.c.

◆ zend_hash_apply_with_arguments()

ZEND_API void zend_hash_apply_with_arguments ( HashTable * ht,
apply_func_args_t apply_func,
int num_args,
... )

Definition at line 2137 of file zend_hash.c.

◆ zend_hash_bucket_packed_swap()

ZEND_API void zend_hash_bucket_packed_swap ( Bucket * p,
Bucket * q )

Definition at line 2961 of file zend_hash.c.

◆ zend_hash_bucket_renum_swap()

ZEND_API void zend_hash_bucket_renum_swap ( Bucket * p,
Bucket * q )

Definition at line 2952 of file zend_hash.c.

◆ zend_hash_bucket_swap()

ZEND_API void zend_hash_bucket_swap ( Bucket * p,
Bucket * q )

Definition at line 2933 of file zend_hash.c.

◆ zend_hash_clean()

ZEND_API void ZEND_FASTCALL zend_hash_clean ( HashTable * ht)

Definition at line 1869 of file zend_hash.c.

◆ zend_hash_compare()

ZEND_API int zend_hash_compare ( HashTable * ht1,
HashTable * ht2,
compare_func_t compar,
bool ordered )

Definition at line 3197 of file zend_hash.c.

◆ zend_hash_copy()

ZEND_API void ZEND_FASTCALL zend_hash_copy ( HashTable * target,
HashTable * source,
copy_ctor_func_t pCopyConstructor )

Definition at line 2240 of file zend_hash.c.

◆ zend_hash_del()

ZEND_API zend_result ZEND_FASTCALL zend_hash_del ( HashTable * ht,
zend_string * key )

Definition at line 1534 of file zend_hash.c.

◆ zend_hash_del_bucket()

ZEND_API void ZEND_FASTCALL zend_hash_del_bucket ( HashTable * ht,
Bucket * p )

Definition at line 1526 of file zend_hash.c.

◆ zend_hash_del_ind()

ZEND_API zend_result ZEND_FASTCALL zend_hash_del_ind ( HashTable * ht,
zend_string * key )

Definition at line 1566 of file zend_hash.c.

◆ zend_hash_destroy()

ZEND_API void ZEND_FASTCALL zend_hash_destroy ( HashTable * ht)

Definition at line 1727 of file zend_hash.c.

◆ zend_hash_discard()

ZEND_API void ZEND_FASTCALL zend_hash_discard ( HashTable * ht,
uint32_t nNumUsed )

Definition at line 435 of file zend_hash.c.

◆ zend_hash_extend()

ZEND_API void ZEND_FASTCALL zend_hash_extend ( HashTable * ht,
uint32_t nSize,
bool packed )

Definition at line 396 of file zend_hash.c.

◆ zend_hash_find()

ZEND_API zval *ZEND_FASTCALL zend_hash_find ( const HashTable * ht,
zend_string * key )

Definition at line 2668 of file zend_hash.c.

◆ zend_hash_find_known_hash()

ZEND_API zval *ZEND_FASTCALL zend_hash_find_known_hash ( const HashTable * ht,
const zend_string * key )

Definition at line 2679 of file zend_hash.c.

◆ zend_hash_find_ptr_lc()

ZEND_API void * zend_hash_find_ptr_lc ( const HashTable * ht,
zend_string * key )

Definition at line 104 of file zend_hash.c.

◆ zend_hash_get_current_data_ex()

ZEND_API zval *ZEND_FASTCALL zend_hash_get_current_data_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2915 of file zend_hash.c.

◆ zend_hash_get_current_key_ex()

ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex ( const HashTable * ht,
zend_string ** str_index,
zend_ulong * num_index,
const HashPosition * pos )

Definition at line 2846 of file zend_hash.c.

◆ zend_hash_get_current_key_type_ex()

ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2893 of file zend_hash.c.

◆ zend_hash_get_current_key_zval_ex()

ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex ( const HashTable * ht,
zval * key,
const HashPosition * pos )

Definition at line 2870 of file zend_hash.c.

◆ zend_hash_get_current_pos()

ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos ( const HashTable * ht)

Definition at line 512 of file zend_hash.c.

◆ zend_hash_get_current_pos_ex()

ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos_ex ( const HashTable * ht,
HashPosition pos )

Definition at line 517 of file zend_hash.c.

◆ zend_hash_graceful_destroy()

ZEND_API void ZEND_FASTCALL zend_hash_graceful_destroy ( HashTable * ht)

Definition at line 1986 of file zend_hash.c.

◆ zend_hash_graceful_reverse_destroy()

ZEND_API void ZEND_FASTCALL zend_hash_graceful_reverse_destroy ( HashTable * ht)

Definition at line 2015 of file zend_hash.c.

◆ zend_hash_index_add()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_add ( HashTable * ht,
zend_ulong h,
zval * pData )

Definition at line 1209 of file zend_hash.c.

◆ zend_hash_index_add_empty_element()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_empty_element ( HashTable * ht,
zend_ulong h )

Definition at line 1059 of file zend_hash.c.

◆ zend_hash_index_add_new()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_new ( HashTable * ht,
zend_ulong h,
zval * pData )

Definition at line 1214 of file zend_hash.c.

◆ zend_hash_index_add_or_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_or_update ( HashTable * ht,
zend_ulong h,
zval * pData,
uint32_t flag )

Definition at line 1191 of file zend_hash.c.

◆ zend_hash_index_del()

ZEND_API zend_result ZEND_FASTCALL zend_hash_index_del ( HashTable * ht,
zend_ulong h )

Definition at line 1692 of file zend_hash.c.

◆ zend_hash_index_find()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_find ( const HashTable * ht,
zend_ulong h )

Definition at line 2701 of file zend_hash.c.

◆ zend_hash_index_lookup()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_lookup ( HashTable * ht,
zend_ulong h )

Definition at line 1234 of file zend_hash.c.

◆ zend_hash_index_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_index_update ( HashTable * ht,
zend_ulong h,
zval * pData )

Definition at line 1219 of file zend_hash.c.

◆ zend_hash_internal_pointer_end_ex()

ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2744 of file zend_hash.c.

◆ zend_hash_internal_pointer_reset_ex()

ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2733 of file zend_hash.c.

◆ zend_hash_iterator_add()

ZEND_API uint32_t ZEND_FASTCALL zend_hash_iterator_add ( HashTable * ht,
HashPosition pos )

Definition at line 537 of file zend_hash.c.

◆ zend_hash_iterator_del()

ZEND_API void ZEND_FASTCALL zend_hash_iterator_del ( uint32_t idx)

Definition at line 649 of file zend_hash.c.

◆ zend_hash_iterator_pos()

ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos ( uint32_t idx,
HashTable * ht )

Definition at line 608 of file zend_hash.c.

◆ zend_hash_iterator_pos_ex()

ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterator_pos_ex ( uint32_t idx,
zval * array )

Definition at line 627 of file zend_hash.c.

◆ zend_hash_iterators_advance()

ZEND_API void ZEND_FASTCALL zend_hash_iterators_advance ( HashTable * ht,
HashPosition step )

Definition at line 724 of file zend_hash.c.

◆ zend_hash_iterators_lower_pos()

ZEND_API HashPosition ZEND_FASTCALL zend_hash_iterators_lower_pos ( HashTable * ht,
HashPosition start )

Definition at line 694 of file zend_hash.c.

◆ zend_hash_lookup()

ZEND_API zval *ZEND_FASTCALL zend_hash_lookup ( HashTable * ht,
zend_string * key )

Definition at line 1012 of file zend_hash.c.

◆ zend_hash_merge()

ZEND_API void ZEND_FASTCALL zend_hash_merge ( HashTable * target,
HashTable * source,
copy_ctor_func_t pCopyConstructor,
bool overwrite )

Definition at line 2547 of file zend_hash.c.

◆ zend_hash_merge_ex()

ZEND_API void ZEND_FASTCALL zend_hash_merge_ex ( HashTable * target,
HashTable * source,
copy_ctor_func_t pCopyConstructor,
merge_checker_func_t pMergeSource,
void * pParam )

Definition at line 2643 of file zend_hash.c.

◆ zend_hash_minmax()

ZEND_API zval *ZEND_FASTCALL zend_hash_minmax ( const HashTable * ht,
compare_func_t compar,
uint32_t flag )

Definition at line 3224 of file zend_hash.c.

◆ zend_hash_move_backwards_ex()

ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2812 of file zend_hash.c.

◆ zend_hash_move_forward_ex()

ZEND_API zend_result ZEND_FASTCALL zend_hash_move_forward_ex ( HashTable * ht,
HashPosition * pos )

Definition at line 2773 of file zend_hash.c.

◆ zend_hash_next_index_insert()

ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert ( HashTable * ht,
zval * pData )

Definition at line 1224 of file zend_hash.c.

◆ zend_hash_next_index_insert_new()

ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert_new ( HashTable * ht,
zval * pData )

Definition at line 1229 of file zend_hash.c.

◆ zend_hash_packed_del_val()

ZEND_API void ZEND_FASTCALL zend_hash_packed_del_val ( HashTable * ht,
zval * zv )

Definition at line 1517 of file zend_hash.c.

◆ zend_hash_packed_grow()

ZEND_API void ZEND_FASTCALL zend_hash_packed_grow ( HashTable * ht)

Definition at line 311 of file zend_hash.c.

◆ zend_hash_packed_to_hash()

ZEND_API void ZEND_FASTCALL zend_hash_packed_to_hash ( HashTable * ht)

Definition at line 346 of file zend_hash.c.

◆ zend_hash_real_init()

ZEND_API void ZEND_FASTCALL zend_hash_real_init ( HashTable * ht,
bool packed )

Definition at line 322 of file zend_hash.c.

◆ zend_hash_real_init_mixed()

ZEND_API void ZEND_FASTCALL zend_hash_real_init_mixed ( HashTable * ht)

Definition at line 338 of file zend_hash.c.

◆ zend_hash_real_init_packed()

ZEND_API void ZEND_FASTCALL zend_hash_real_init_packed ( HashTable * ht)

Definition at line 330 of file zend_hash.c.

◆ zend_hash_rehash()

ZEND_API void ZEND_FASTCALL zend_hash_rehash ( HashTable * ht)

Definition at line 1328 of file zend_hash.c.

◆ zend_hash_reverse_apply()

ZEND_API void ZEND_FASTCALL zend_hash_reverse_apply ( HashTable * ht,
apply_func_t apply_func )

Definition at line 2192 of file zend_hash.c.

◆ zend_hash_set_bucket_key()

ZEND_API zval *ZEND_FASTCALL zend_hash_set_bucket_key ( HashTable * ht,
Bucket * p,
zend_string * key )

Definition at line 1239 of file zend_hash.c.

◆ zend_hash_sort_ex()

ZEND_API void ZEND_FASTCALL zend_hash_sort_ex ( HashTable * ht,
sort_func_t sort_func,
bucket_compare_func_t compare_func,
bool renumber )

Definition at line 3068 of file zend_hash.c.

◆ zend_hash_str_add()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_add ( HashTable * ht,
const char * key,
size_t len,
zval * pData )

Definition at line 1045 of file zend_hash.c.

◆ zend_hash_str_add_empty_element()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_empty_element ( HashTable * ht,
const char * key,
size_t len )

Definition at line 1075 of file zend_hash.c.

◆ zend_hash_str_add_new()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_new ( HashTable * ht,
const char * key,
size_t len,
zval * pData )

Definition at line 1052 of file zend_hash.c.

◆ zend_hash_str_add_or_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_add_or_update ( HashTable * ht,
const char * key,
size_t len,
zval * pData,
uint32_t flag )

Definition at line 1017 of file zend_hash.c.

◆ zend_hash_str_del()

ZEND_API zend_result ZEND_FASTCALL zend_hash_str_del ( HashTable * ht,
const char * key,
size_t len )

Definition at line 1661 of file zend_hash.c.

◆ zend_hash_str_del_ind()

ZEND_API zend_result ZEND_FASTCALL zend_hash_str_del_ind ( HashTable * ht,
const char * key,
size_t len )

Definition at line 1616 of file zend_hash.c.

◆ zend_hash_str_find()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_find ( const HashTable * ht,
const char * key,
size_t len )

Definition at line 2689 of file zend_hash.c.

◆ zend_hash_str_find_ptr_lc()

ZEND_API void * zend_hash_str_find_ptr_lc ( const HashTable * ht,
const char * str,
size_t len )

Definition at line 90 of file zend_hash.c.

◆ zend_hash_str_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_update ( HashTable * ht,
const char * key,
size_t len,
zval * pData )

Definition at line 1031 of file zend_hash.c.

◆ zend_hash_str_update_ind()

ZEND_API zval *ZEND_FASTCALL zend_hash_str_update_ind ( HashTable * ht,
const char * key,
size_t len,
zval * pData )

Definition at line 1038 of file zend_hash.c.

◆ zend_hash_to_packed()

ZEND_API void ZEND_FASTCALL zend_hash_to_packed ( HashTable * ht)

Definition at line 374 of file zend_hash.c.

◆ zend_hash_update()

ZEND_API zval *ZEND_FASTCALL zend_hash_update ( HashTable * ht,
zend_string * key,
zval * pData )

Definition at line 997 of file zend_hash.c.

◆ zend_hash_update_ind()

ZEND_API zval *ZEND_FASTCALL zend_hash_update_ind ( HashTable * ht,
zend_string * key,
zval * pData )

Definition at line 1002 of file zend_hash.c.

◆ zend_new_pair()

ZEND_API HashTable *ZEND_FASTCALL zend_new_pair ( zval * val1,
zval * val2 )

Definition at line 296 of file zend_hash.c.

◆ zend_proptable_to_symtable()

ZEND_API HashTable *ZEND_FASTCALL zend_proptable_to_symtable ( HashTable * ht,
bool always_duplicate )

Definition at line 3387 of file zend_hash.c.

◆ zend_symtable_clean()

ZEND_API void ZEND_FASTCALL zend_symtable_clean ( HashTable * ht)

Definition at line 1946 of file zend_hash.c.

◆ zend_symtable_to_proptable()

ZEND_API HashTable *ZEND_FASTCALL zend_symtable_to_proptable ( HashTable * ht)

Definition at line 3334 of file zend_hash.c.

Variable Documentation

◆ zend_empty_array

ZEND_API const HashTable zend_empty_array
extern

Definition at line 248 of file zend_hash.c.