37#define HAS_FIXEDARRAY_ARRAYACCESS_OVERRIDE(object, method) UNEXPECTED((object)->ce != spl_ce_SplFixedArray && (object)->ce->arrayaccess_funcs_ptr->method->common.scope != spl_ce_SplFixedArray)
63#define Z_SPLFIXEDARRAY_P(zv) spl_fixed_array_from_obj(Z_OBJ_P((zv)))
109 spl_fixedarray_init_non_empty_struct(array,
size);
110 spl_fixedarray_init_elems(array, 0,
size);
112 spl_fixedarray_default_ctor(array);
133 spl_fixedarray_init(to,
size);
136 spl_fixedarray_copy_range(to, 0,
begin,
end);
157 if (!spl_fixedarray_empty(array)) {
176 if (array->
size == 0) {
177 spl_fixedarray_init(array,
size);
191 spl_fixedarray_dtor(array);
196 spl_fixedarray_init_elems(array, array->
size,
size);
200 spl_fixedarray_dtor_range(array,
size, array->
size);
207 if (cached_resize !=
size) {
208 spl_fixedarray_resize(array, cached_resize);
236 if (
size == 0 && (!source_properties || !zend_hash_num_elements(source_properties))) {
250 if (source_properties && zend_hash_num_elements(source_properties) > 0) {
267static void spl_fixedarray_object_free_storage(
zend_object *
object)
270 spl_fixedarray_dtor(&intern->
array);
278 bool inherited =
false;
285 if (orig && clone_orig) {
287 spl_fixedarray_copy_ctor(&intern->
array, &other->
array);
295 parent = parent->parent;
315 return spl_fixedarray_object_new_ex(class_type,
NULL, 0);
320 zend_object *new_object = spl_fixedarray_object_new_ex(old_object->
ce, old_object, 1);
370 index = spl_offset_convert_to_long(
offset);
375 if (index < 0 || index >= intern->
array.
size) {
388 return &
EG(uninitialized_zval);
397 zend_call_known_instance_method_with_1_params(
object->ce->arrayaccess_funcs_ptr->zf_offsetget,
object,
rv,
offset);
401 return &
EG(uninitialized_zval);
405 return spl_fixedarray_object_read_dimension_helper(intern,
offset);
418 index = spl_offset_convert_to_long(
offset);
423 if (index < 0 || index >= intern->
array.
size) {
450 spl_fixedarray_object_write_dimension_helper(intern,
offset,
value);
457 index = spl_offset_convert_to_long(
offset);
462 if (index < 0 || index >= intern->
array.
size) {
476 zend_call_known_instance_method_with_1_params(
object->ce->arrayaccess_funcs_ptr->zf_offsetunset,
object,
NULL,
offset);
481 spl_fixedarray_object_unset_dimension_helper(intern,
offset);
488 index = spl_offset_convert_to_long(
offset);
493 if (index < 0 || index >= intern->
array.
size) {
509 zend_call_known_instance_method_with_1_params(
object->ce->arrayaccess_funcs_ptr->zf_offsetexists,
object, &
rv,
offset);
517 return spl_fixedarray_object_has_dimension_helper(intern,
offset, check_empty);
524 intern = spl_fixed_array_from_obj(
object);
527 zend_call_known_instance_method_with_0_params(intern->
fptr_count,
object, &
rv);
557 if (!spl_fixedarray_empty(&intern->
array)) {
562 spl_fixedarray_init(&intern->
array,
size);
577 int size = zend_hash_num_elements(intern_ht);
579 spl_fixedarray_init(&intern->
array,
size);
603 uint32_t num_properties = zend_hash_num_elements(
ht);
629 zval members_zv, *elem;
638 size = zend_hash_num_elements(
data);
639 spl_fixedarray_init_non_empty_struct(&intern->
array,
size);
693 if (!spl_fixedarray_empty(&intern->
array)) {
710 bool save_indexes = 1;
718 if (num > 0 && save_indexes) {
730 if (num_index > max_index) {
731 max_index = num_index;
740 spl_fixedarray_init(&array, tmp);
746 }
else if (num > 0 && !save_indexes) {
750 spl_fixedarray_init(&array, num);
757 spl_fixedarray_init(&array, 0);
763 intern->
array = array;
796 spl_fixedarray_resize(&intern->
array,
size);
812 RETURN_BOOL(spl_fixedarray_object_has_dimension_helper(intern, zindex, 0));
826 value = spl_fixedarray_object_read_dimension_helper(intern, zindex);
846 spl_fixedarray_object_write_dimension_helper(intern, zindex,
value);
861 spl_fixedarray_object_unset_dimension_helper(intern, zindex);
916 data = spl_fixedarray_object_read_dimension_helper(
object, &zindex);
919 data = &
EG(uninitialized_zval);
936 spl_fixedarray_it_dtor,
937 spl_fixedarray_it_valid,
938 spl_fixedarray_it_get_current_data,
939 spl_fixedarray_it_get_current_key,
940 spl_fixedarray_it_move_forward,
941 spl_fixedarray_it_rewind,
976 spl_handler_SplFixedArray.clone_obj = spl_fixedarray_object_clone;
977 spl_handler_SplFixedArray.read_dimension = spl_fixedarray_object_read_dimension;
978 spl_handler_SplFixedArray.write_dimension = spl_fixedarray_object_write_dimension;
979 spl_handler_SplFixedArray.unset_dimension = spl_fixedarray_object_unset_dimension;
980 spl_handler_SplFixedArray.has_dimension = spl_fixedarray_object_has_dimension;
981 spl_handler_SplFixedArray.count_elements = spl_fixedarray_object_count_elements;
982 spl_handler_SplFixedArray.get_properties_for = spl_fixedarray_object_get_properties_for;
983 spl_handler_SplFixedArray.get_gc = spl_fixedarray_object_get_gc;
984 spl_handler_SplFixedArray.free_obj = spl_fixedarray_object_free_storage;
count(Countable|array $value, int $mode=COUNT_NORMAL)
PHP_JSON_API zend_class_entry * php_json_serializable_ce
#define PHP_MINIT_FUNCTION
unsigned const char * end
unsigned char key[REFLECTION_KEY_LEN]
PHPAPI zend_class_entry * spl_ce_OutOfBoundsException
PHPAPI zend_class_entry * spl_ce_InvalidArgumentException
struct _spl_fixedarray_object spl_fixedarray_object
struct _spl_fixedarray spl_fixedarray
#define Z_SPLFIXEDARRAY_P(zv)
PHPAPI zend_class_entry * spl_ce_SplFixedArray
#define HAS_FIXEDARRAY_ARRAYACCESS_OVERRIDE(object, method)
struct _spl_fixedarray_it spl_fixedarray_it
zend_object_iterator intern
zend_function * fptr_count
int default_properties_count
const zend_object_iterator_funcs * funcs
struct _zend_function::@236135173067030250234125302313220025134003177336 common
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API ZEND_COLD void zend_illegal_container_offset(const zend_string *container, const zval *offset, int type)
ZEND_API zend_result object_init_ex(zval *arg, zend_class_entry *class_type)
ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec,...)
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type)
ZEND_API ZEND_COLD void zend_argument_value_error(uint32_t arg_num, const char *format,...)
ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
#define RETURN_COPY_DEREF(zv)
ZEND_API void zend_call_known_instance_method_with_2_params(zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2)
#define ZEND_PARSE_PARAMETERS_NONE()
#define array_init_size(arg, size)
#define zend_parse_parameters_none()
#define RETURN_EMPTY_ARRAY()
#define safe_erealloc(ptr, nmemb, size, offset)
#define erealloc(ptr, size)
#define safe_emalloc(nmemb, size, offset)
ZEND_API ZEND_COLD zend_object * zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code)
ZEND_API ZEND_COLD zend_object * zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format,...)
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_use_resource_as_offset(const zval *dim)
union _zend_function zend_function
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert_new(HashTable *ht, zval *pData)
ZEND_API zval *ZEND_FASTCALL zend_hash_next_index_insert(HashTable *ht, zval *pData)
ZEND_API void ZEND_FASTCALL zend_hash_clean(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_add_new(HashTable *ht, zend_string *key, 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_add(HashTable *ht, zend_string *key, zval *pData)
#define ZEND_HASH_FOREACH_STR_KEY_VAL_IND(ht, _key, _val)
#define ZEND_HASH_FOREACH_NUM_KEY_VAL(ht, _h, _val)
#define ZEND_HASH_FOREACH_KEY(ht, _h, _key)
#define zend_new_array(size)
#define ZEND_HANDLE_NUMERIC(key, idx)
#define ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val)
#define ZEND_HASH_FOREACH_END()
#define ZEND_HASH_FOREACH_VAL(ht, _val)
#define ZEND_HASH_MAP_FOREACH_KEY_VAL_IND(ht, _h, _key, _val)
ZEND_API zend_class_entry * zend_ce_countable
ZEND_API zend_class_entry * zend_ce_arrayaccess
ZEND_API zend_class_entry * zend_ce_aggregate
ZEND_API zend_result zend_create_internal_iterator_zval(zval *return_value, zval *obj)
ZEND_API void zend_iterator_init(zend_object_iterator *iter)
struct _zend_object_iterator zend_object_iterator
struct _zend_object_iterator_funcs zend_object_iterator_funcs
struct _zend_string zend_string
ZEND_API HashTable * zend_std_get_properties(zend_object *zobj)
ZEND_API const zend_object_handlers std_object_handlers
enum _zend_prop_purpose zend_prop_purpose
@ ZEND_PROP_PURPOSE_SERIALIZE
@ ZEND_PROP_PURPOSE_GET_OBJECT_VARS
ZEND_API void ZEND_FASTCALL zend_objects_clone_members(zend_object *new_object, zend_object *old_object)
ZEND_API void ZEND_FASTCALL zend_object_std_init(zend_object *object, zend_class_entry *ce)
ZEND_API void zend_object_std_dtor(zend_object *object)
ZEND_API bool ZEND_FASTCALL zend_is_true(const zval *op)
#define XtOffsetOf(s_type, field)
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define Z_TRY_ADDREF_P(pz)
#define Z_REFVAL_P(zval_p)
#define Z_ISUNDEF_P(zval_p)
#define Z_ARRVAL_P(zval_p)
struct _zend_array HashTable
#define ZVAL_COPY_DEREF(z, v)
#define Z_RES_HANDLE_P(zval_p)
#define ZVAL_OBJ_COPY(z, o)
ZEND_RESULT_CODE zend_result
struct _zend_object_handlers zend_object_handlers
#define ZVAL_COPY_VALUE(z, v)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
zend_refcounted * garbage