Lines Matching refs:struc
35 #define COMMON (Z_ISREF_PP(struc) ? "&" : "")
87 PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC) /* {{{ */ in php_var_dump() argument
99 switch (Z_TYPE_PP(struc)) { in php_var_dump()
101 php_printf("%sbool(%s)\n", COMMON, Z_LVAL_PP(struc) ? "true" : "false"); in php_var_dump()
107 php_printf("%sint(%ld)\n", COMMON, Z_LVAL_PP(struc)); in php_var_dump()
110 php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_PP(struc)); in php_var_dump()
113 php_printf("%sstring(%d) \"", COMMON, Z_STRLEN_PP(struc)); in php_var_dump()
114 PHPWRITE(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc)); in php_var_dump()
118 myht = Z_ARRVAL_PP(struc); in php_var_dump()
129 myht = Z_OBJDEBUG_PP(struc, is_temp); in php_var_dump()
136 if (Z_OBJ_HANDLER(**struc, get_class_name)) { in php_var_dump()
137 Z_OBJ_HANDLER(**struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); in php_var_dump()
138 …php_printf("%sobject(%s)#%d (%d) {\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_has… in php_var_dump()
141 …php_printf("%sobject(unknown class)#%d (%d) {\n", COMMON, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash… in php_var_dump()
159 const char *type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC); in php_var_dump()
160 …php_printf("%sresource(%ld) of type (%s)\n", COMMON, Z_LVAL_PP(struc), type_name ? type_name : "Un… in php_var_dump()
242 PHPAPI void php_debug_zval_dump(zval **struc, int level TSRMLS_DC) /* {{{ */ in php_debug_zval_dump() argument
254 switch (Z_TYPE_PP(struc)) { in php_debug_zval_dump()
256 …_printf("%sbool(%s) refcount(%u)\n", COMMON, Z_LVAL_PP(struc)?"true":"false", Z_REFCOUNT_PP(struc)… in php_debug_zval_dump()
259 php_printf("%sNULL refcount(%u)\n", COMMON, Z_REFCOUNT_PP(struc)); in php_debug_zval_dump()
262 php_printf("%slong(%ld) refcount(%u)\n", COMMON, Z_LVAL_PP(struc), Z_REFCOUNT_PP(struc)); in php_debug_zval_dump()
265 …double(%.*G) refcount(%u)\n", COMMON, (int) EG(precision), Z_DVAL_PP(struc), Z_REFCOUNT_PP(struc)); in php_debug_zval_dump()
268 php_printf("%sstring(%d) \"", COMMON, Z_STRLEN_PP(struc)); in php_debug_zval_dump()
269 PHPWRITE(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc)); in php_debug_zval_dump()
270 php_printf("\" refcount(%u)\n", Z_REFCOUNT_PP(struc)); in php_debug_zval_dump()
273 myht = Z_ARRVAL_PP(struc); in php_debug_zval_dump()
278 …_printf("%sarray(%d) refcount(%u){\n", COMMON, zend_hash_num_elements(myht), Z_REFCOUNT_PP(struc)); in php_debug_zval_dump()
282 myht = Z_OBJDEBUG_PP(struc, is_temp); in php_debug_zval_dump()
287 Z_OBJ_HANDLER_PP(struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); in php_debug_zval_dump()
288 …{\n", COMMON, class_name, Z_OBJ_HANDLE_PP(struc), myht ? zend_hash_num_elements(myht) : 0, Z_REFCO… in php_debug_zval_dump()
293 …RMLS_CC, (apply_func_args_t) zval_element_dump_func, 1, level, (Z_TYPE_PP(struc) == IS_ARRAY ? 0 :… in php_debug_zval_dump()
305 const char *type_name = zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(struc) TSRMLS_CC); in php_debug_zval_dump()
306 …type (%s) refcount(%u)\n", COMMON, Z_LVAL_PP(struc), type_name ? type_name : "Unknown", Z_REFCOUNT… in php_debug_zval_dump()
416 PHPAPI void php_var_export_ex(zval **struc, int level, smart_str *buf TSRMLS_DC) /* {{{ */ in php_var_export_ex() argument
424 switch (Z_TYPE_PP(struc)) { in php_var_export_ex()
426 if (Z_LVAL_PP(struc)) { in php_var_export_ex()
436 smart_str_append_long(buf, Z_LVAL_PP(struc)); in php_var_export_ex()
439 tmp_len = spprintf(&tmp_str, 0,"%.*H", PG(serialize_precision), Z_DVAL_PP(struc)); in php_var_export_ex()
444 …tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "'\\", 2 TSRMLS_CC); in php_var_export_ex()
455 myht = Z_ARRVAL_PP(struc); in php_var_export_ex()
476 myht = Z_OBJPROP_PP(struc); in php_var_export_ex()
486 Z_OBJ_HANDLER(**struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); in php_var_export_ex()
509 PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{ */ in php_var_export() argument
512 php_var_export_ex(struc, level, &buf TSRMLS_CC); in php_var_export()
544 static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC);
603 static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc TSRMLS_DC) /* {{{ … in php_var_serialize_class_name()
607 PHP_SET_CLASS_ATTRIBUTES(struc); in php_var_serialize_class_name()
618 static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, HashTable *var_h… in php_var_serialize_class() argument
623 incomplete_class = php_var_serialize_class_name(buf, struc TSRMLS_CC); in php_var_serialize_class()
663 propers = Z_OBJPROP_P(struc); in php_var_serialize_class()
669 ce = zend_get_class_entry(struc TSRMLS_CC); in php_var_serialize_class()
706 static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var_hash TSRMLS_DC) /*… in php_var_serialize_intern() argument
716 if (var_hash && php_add_var_hash(var_hash, struc, (void *) &var_already TSRMLS_CC) == FAILURE) { in php_var_serialize_intern()
717 if (Z_ISREF_P(struc)) { in php_var_serialize_intern()
722 } else if (Z_TYPE_P(struc) == IS_OBJECT) { in php_var_serialize_intern()
730 switch (Z_TYPE_P(struc)) { in php_var_serialize_intern()
733 smart_str_append_long(buf, Z_LVAL_P(struc)); in php_var_serialize_intern()
742 php_var_serialize_long(buf, Z_LVAL_P(struc)); in php_var_serialize_intern()
750 php_gcvt(Z_DVAL_P(struc), PG(serialize_precision), '.', 'E', s); in php_var_serialize_intern()
758 php_var_serialize_string(buf, Z_STRVAL_P(struc), Z_STRLEN_P(struc)); in php_var_serialize_intern()
767 if (Z_OBJ_HT_P(struc)->get_class_entry) { in php_var_serialize_intern()
768 ce = Z_OBJCE_P(struc); in php_var_serialize_intern()
776 …if (ce->serialize(struc, &serialized_data, &serialized_length, (zend_serialize_data *)var_hash TSR… in php_var_serialize_intern()
778 smart_str_append_long(buf, (int)Z_OBJCE_P(struc)->name_length); in php_var_serialize_intern()
780 smart_str_appendl(buf, Z_OBJCE_P(struc)->name, Z_OBJCE_P(struc)->name_length); in php_var_serialize_intern()
800 …res = call_user_function_ex(CG(function_table), &struc, &fname, &retval_ptr, 0, 0, 1, NULL TSRMLS_… in php_var_serialize_intern()
813 php_var_serialize_class(buf, struc, retval_ptr, var_hash TSRMLS_CC); in php_var_serialize_intern()
833 if (Z_TYPE_P(struc) == IS_ARRAY) { in php_var_serialize_intern()
835 myht = HASH_OF(struc); in php_var_serialize_intern()
837 incomplete_class = php_var_serialize_class_name(buf, struc TSRMLS_CC); in php_var_serialize_intern()
838 myht = Z_OBJPROP_P(struc); in php_var_serialize_intern()
878 || data == &struc in php_var_serialize_intern()
903 PHPAPI void php_var_serialize(smart_str *buf, zval **struc, php_serialize_data_t *var_hash TSRMLS_D… in php_var_serialize() argument
905 php_var_serialize_intern(buf, *struc, *var_hash TSRMLS_CC); in php_var_serialize()
914 zval **struc; in PHP_FUNCTION() local
918 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &struc) == FAILURE) { in PHP_FUNCTION()
927 php_var_serialize(&buf, struc, &var_hash TSRMLS_CC); in PHP_FUNCTION()