Lines Matching refs:val
46 static int php_json_determine_array_type(zval *val) /* {{{ */ in php_json_determine_array_type() argument
49 HashTable *myht = Z_ARRVAL_P(val); in php_json_determine_array_type()
118 static void php_json_encode_array(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_array() argument
123 if (Z_TYPE_P(val) == IS_ARRAY) { in php_json_encode_array()
124 myht = Z_ARRVAL_P(val); in php_json_encode_array()
125 … = (options & PHP_JSON_FORCE_OBJECT) ? PHP_JSON_OUTPUT_OBJECT : php_json_determine_array_type(val); in php_json_encode_array()
127 myht = Z_OBJPROP_P(val); in php_json_encode_array()
172 if (ZSTR_VAL(key)[0] == '\0' && Z_TYPE_P(val) == IS_OBJECT) { in php_json_encode_array()
446 static void php_json_encode_serializable_object(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_serializable_object() argument
448 zend_class_entry *ce = Z_OBJCE_P(val); in php_json_encode_serializable_object()
453 if (Z_TYPE_P(val) == IS_ARRAY) { in php_json_encode_serializable_object()
454 myht = Z_ARRVAL_P(val); in php_json_encode_serializable_object()
456 myht = Z_OBJPROP_P(val); in php_json_encode_serializable_object()
469 …if (FAILURE == call_user_function_ex(EG(function_table), val, &fname, &retval, 0, NULL, 1, NULL) |… in php_json_encode_serializable_object()
488 (Z_OBJ(retval) == Z_OBJ_P(val))) { in php_json_encode_serializable_object()
501 void php_json_encode_zval(smart_str *buf, zval *val, int options) /* {{{ */ in php_json_encode_zval() argument
504 switch (Z_TYPE_P(val)) in php_json_encode_zval()
518 smart_str_append_long(buf, Z_LVAL_P(val)); in php_json_encode_zval()
522 if (php_json_is_valid_double(Z_DVAL_P(val))) { in php_json_encode_zval()
523 php_json_encode_double(buf, Z_DVAL_P(val), options); in php_json_encode_zval()
531 php_json_escape_string(buf, Z_STRVAL_P(val), Z_STRLEN_P(val), options); in php_json_encode_zval()
535 if (instanceof_function(Z_OBJCE_P(val), php_json_serializable_ce)) { in php_json_encode_zval()
536 php_json_encode_serializable_object(buf, val, options); in php_json_encode_zval()
541 php_json_encode_array(buf, val, options); in php_json_encode_zval()
545 val = Z_REFVAL_P(val); in php_json_encode_zval()