Lines Matching refs:struc
83 PHPAPI void php_var_dump(zval *struc, int level) /* {{{ */ in php_var_dump() argument
99 switch (Z_TYPE_P(struc)) { in php_var_dump()
110 php_printf("%sint(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc)); in php_var_dump()
113 php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc)); in php_var_dump()
116 php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc)); in php_var_dump()
117 PHPWRITE(Z_STRVAL_P(struc), Z_STRLEN_P(struc)); in php_var_dump()
121 myht = Z_ARRVAL_P(struc); in php_var_dump()
147 if (Z_OBJ_APPLY_COUNT_P(struc) > 0) { in php_var_dump()
151 Z_OBJ_INC_APPLY_COUNT_P(struc); in php_var_dump()
153 myht = Z_OBJDEBUG_P(struc, is_temp); in php_var_dump()
154 class_name = Z_OBJ_HANDLER_P(struc, get_class_name)(Z_OBJ_P(struc)); in php_var_dump()
155 …php_printf("%sobject(%s)#%d (%d) {\n", COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ?… in php_var_dump()
175 Z_OBJ_DEC_APPLY_COUNT_P(struc); in php_var_dump()
178 const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(struc)); in php_var_dump()
179 …php_printf("%sresource(%d) of type (%s)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name … in php_var_dump()
184 if (Z_REFCOUNT_P(struc) > 1) { in php_var_dump()
187 struc = Z_REFVAL_P(struc); in php_var_dump()
253 PHPAPI void php_debug_zval_dump(zval *struc, int level) /* {{{ */ in php_debug_zval_dump() argument
269 switch (Z_TYPE_P(struc)) { in php_debug_zval_dump()
280 php_printf("%sint(" ZEND_LONG_FMT ")\n", COMMON, Z_LVAL_P(struc)); in php_debug_zval_dump()
283 php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_P(struc)); in php_debug_zval_dump()
286 php_printf("%sstring(%zd) \"", COMMON, Z_STRLEN_P(struc)); in php_debug_zval_dump()
287 PHPWRITE(Z_STRVAL_P(struc), Z_STRLEN_P(struc)); in php_debug_zval_dump()
288 php_printf("\" refcount(%u)\n", Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1); in php_debug_zval_dump()
291 myht = Z_ARRVAL_P(struc); in php_debug_zval_dump()
298 …ntf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1); in php_debug_zval_dump()
315 myht = Z_OBJDEBUG_P(struc, is_temp); in php_debug_zval_dump()
324 class_name = Z_OBJ_HANDLER_P(struc, get_class_name)(Z_OBJ_P(struc)); in php_debug_zval_dump()
325 … COMMON, ZSTR_VAL(class_name), Z_OBJ_HANDLE_P(struc), myht ? zend_array_count(myht) : 0, Z_REFCOUN… in php_debug_zval_dump()
343 const char *type_name = zend_rsrc_list_get_rsrc_type(Z_RES_P(struc)); in php_debug_zval_dump()
344 …ype (%s) refcount(%u)\n", COMMON, Z_RES_P(struc)->handle, type_name ? type_name : "Unknown", Z_REF… in php_debug_zval_dump()
349 if (Z_REFCOUNT_P(struc) > 1) { in php_debug_zval_dump()
352 struc = Z_REFVAL_P(struc); in php_debug_zval_dump()
441 PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */ in php_var_export_ex() argument
451 switch (Z_TYPE_P(struc)) { in php_var_export_ex()
464 if (Z_LVAL_P(struc) == ZEND_LONG_MIN) { in php_var_export_ex()
469 smart_str_append_long(buf, Z_LVAL_P(struc)); in php_var_export_ex()
472 php_gcvt(Z_DVAL_P(struc), (int)PG(serialize_precision), '.', 'E', tmp_str); in php_var_export_ex()
480 if (zend_finite(Z_DVAL_P(struc)) && NULL == strchr(tmp_str, '.')) { in php_var_export_ex()
485 ztmp = php_addcslashes(Z_STR_P(struc), 0, "'\\", 2); in php_var_export_ex()
496 myht = Z_ARRVAL_P(struc); in php_var_export_ex()
522 myht = Z_OBJPROP_P(struc); in php_var_export_ex()
537 smart_str_append(buf, Z_OBJCE_P(struc)->name); in php_var_export_ex()
553 struc = Z_REFVAL_P(struc); in php_var_export_ex()
564 PHPAPI void php_var_export(zval *struc, int level) /* {{{ */ in php_var_export() argument
567 php_var_export_ex(struc, level, &buf); in php_var_export()
600 static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash);
666 static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc) /* {{{ */ in php_var_serialize_class_name() argument
670 PHP_SET_CLASS_ATTRIBUTES(struc); in php_var_serialize_class_name()
681 static int php_var_serialize_call_sleep(zval *retval, zval *struc) /* {{{ */ in php_var_serialize_call_sleep() argument
688 res = call_user_function_ex(CG(function_table), struc, &fname, retval, 0, 0, 1, NULL); in php_var_serialize_call_sleep()
732 static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, php_serialize_da… in php_var_serialize_class() argument
734 zend_class_entry *ce = Z_OBJCE_P(struc); in php_var_serialize_class()
739 php_var_serialize_class_name(buf, struc); in php_var_serialize_class()
746 propers = Z_OBJPROP_P(struc); in php_var_serialize_class()
815 static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash) /*… in php_var_serialize_intern() argument
824 if (var_hash && (var_already = php_add_var_hash(var_hash, struc))) { in php_var_serialize_intern()
825 if (Z_ISREF_P(struc)) { in php_var_serialize_intern()
830 } else if (Z_TYPE_P(struc) == IS_OBJECT) { in php_var_serialize_intern()
839 switch (Z_TYPE_P(struc)) { in php_var_serialize_intern()
853 php_var_serialize_long(buf, Z_LVAL_P(struc)); in php_var_serialize_intern()
859 php_gcvt(Z_DVAL_P(struc), (int)PG(serialize_precision), '.', 'E', tmp_str); in php_var_serialize_intern()
866 php_var_serialize_string(buf, Z_STRVAL_P(struc), Z_STRLEN_P(struc)); in php_var_serialize_intern()
870 zend_class_entry *ce = Z_OBJCE_P(struc); in php_var_serialize_intern()
877 …if (ce->serialize(struc, &serialized_data, &serialized_length, (zend_serialize_data *)var_hash) ==… in php_var_serialize_intern()
879 smart_str_append_unsigned(buf, ZSTR_LEN(Z_OBJCE_P(struc)->name)); in php_var_serialize_intern()
881 smart_str_append(buf, Z_OBJCE_P(struc)->name); in php_var_serialize_intern()
899 ZVAL_COPY(&tmp, struc); in php_var_serialize_intern()
922 if (Z_TYPE_P(struc) == IS_ARRAY) { in php_var_serialize_intern()
924 myht = Z_ARRVAL_P(struc); in php_var_serialize_intern()
927 incomplete_class = php_var_serialize_class_name(buf, struc); in php_var_serialize_intern()
928 myht = Z_OBJPROP_P(struc); in php_var_serialize_intern()
961 … if ((Z_TYPE_P(data) == IS_ARRAY && Z_TYPE_P(struc) == IS_ARRAY && Z_ARR_P(data) == Z_ARR_P(struc)) in php_var_serialize_intern()
980 struc = Z_REFVAL_P(struc); in php_var_serialize_intern()
989 PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t *data) /* {{{ */ in php_var_serialize() argument
991 php_var_serialize_intern(buf, struc, *data); in php_var_serialize()
1029 zval *struc; in PHP_FUNCTION() local
1034 Z_PARAM_ZVAL(struc) in PHP_FUNCTION()
1038 php_var_serialize(&buf, struc, &var_hash); in PHP_FUNCTION()