38#ifdef ZEND_INTRIN_AVX2_NATIVE
44#if defined(__aarch64__) || defined(_M_ARM64)
48#if defined(ZEND_WIN32) && !defined(ZTS) && defined(_MSC_VER)
50#define ZEND_USE_TOLOWER_L 1
53#ifdef ZEND_USE_TOLOWER_L
54static _locale_t current_locale =
NULL;
56#define zend_tolower(c) _tolower_l(c, current_locale)
58#define zend_tolower(c) tolower(c)
61#define TYPE_PAIR(t1,t2) (((t1) << 4) | (t2))
63#ifdef ZEND_INTRIN_AVX2_NATIVE
66#define BLOCKCONV_INIT_RANGE(start, end) \
67 const __m256i blconv_offset = _mm256_set1_epi8((signed char)(SCHAR_MIN - start)); \
68 const __m256i blconv_threshold = _mm256_set1_epi8(SCHAR_MIN + (end - start) + 1);
70#define BLOCKCONV_STRIDE sizeof(__m256i)
72#define BLOCKCONV_INIT_DELTA(delta) \
73 const __m256i blconv_delta = _mm256_set1_epi8(delta);
75#define BLOCKCONV_LOAD(input) \
76 __m256i blconv_operand = _mm256_loadu_si256((__m256i*)(input)); \
77 __m256i blconv_mask = _mm256_cmpgt_epi8(blconv_threshold, _mm256_add_epi8(blconv_operand, blconv_offset));
79#define BLOCKCONV_FOUND() _mm256_movemask_epi8(blconv_mask)
81#define BLOCKCONV_STORE(dest) \
82 __m256i blconv_add = _mm256_and_si256(blconv_mask, blconv_delta); \
83 __m256i blconv_result = _mm256_add_epi8(blconv_operand, blconv_add); \
84 _mm256_storeu_si256((__m256i*)(dest), blconv_result);
91#define BLOCKCONV_INIT_RANGE(start, end) \
92 const __m128i blconv_offset = _mm_set1_epi8((signed char)(SCHAR_MIN - start)); \
93 const __m128i blconv_threshold = _mm_set1_epi8(SCHAR_MIN + (end - start) + 1);
95#define BLOCKCONV_STRIDE sizeof(__m128i)
97#define BLOCKCONV_INIT_DELTA(delta) \
98 const __m128i blconv_delta = _mm_set1_epi8(delta);
100#define BLOCKCONV_LOAD(input) \
101 __m128i blconv_operand = _mm_loadu_si128((__m128i*)(input)); \
102 __m128i blconv_mask = _mm_cmplt_epi8(_mm_add_epi8(blconv_operand, blconv_offset), blconv_threshold);
104#define BLOCKCONV_FOUND() _mm_movemask_epi8(blconv_mask)
106#define BLOCKCONV_STORE(dest) \
107 __m128i blconv_add = _mm_and_si128(blconv_mask, blconv_delta); \
108 __m128i blconv_result = _mm_add_epi8(blconv_operand, blconv_add); \
109 _mm_storeu_si128((__m128i *)(dest), blconv_result);
111#elif defined(__aarch64__) || defined(_M_ARM64)
112#define HAVE_BLOCKCONV
114#define BLOCKCONV_INIT_RANGE(start, end) \
115 const int8x16_t blconv_offset = vdupq_n_s8((signed char)(SCHAR_MIN - start)); \
116 const int8x16_t blconv_threshold = vdupq_n_s8(SCHAR_MIN + (end - start) + 1);
118#define BLOCKCONV_STRIDE sizeof(int8x16_t)
120#define BLOCKCONV_INIT_DELTA(delta) \
121 const int8x16_t blconv_delta = vdupq_n_s8(delta);
123#define BLOCKCONV_LOAD(input) \
124 int8x16_t blconv_operand = vld1q_s8((const int8_t*)(input)); \
125 uint8x16_t blconv_mask = vcltq_s8(vreinterpretq_s8_u8(vaddq_u8(vreinterpretq_u8_s8(blconv_operand), vreinterpretq_u8_s8(blconv_offset))), blconv_threshold);
127#define BLOCKCONV_FOUND() vmaxvq_u8(blconv_mask)
129#define BLOCKCONV_STORE(dest) \
130 int8x16_t blconv_add = vandq_s8(vreinterpretq_s8_u8(blconv_mask), blconv_delta); \
131 int8x16_t blconv_result = vaddq_s8(blconv_operand, blconv_add); \
132 vst1q_s8((int8_t *)(dest), blconv_result);
1370x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
1380x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
1390x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
1400x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
1410x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
1420x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x5b,0x5c,0x5d,0x5e,0x5f,
1430x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,
1440x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,
1450x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
1460x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
1470xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
1480xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
1490xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
1500xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
1510xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
1520xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
1560x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
1570x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,
1580x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,
1590x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,
1600x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
1610x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,
1620x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,
1630x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x7b,0x7c,0x7d,0x7e,0x7f,
1640x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,
1650x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,
1660xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,
1670xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,
1680xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,
1690xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,
1700xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,
1710xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
202 switch (str[str_len-1]) {
223 return zend_atol_internal(str, str_len);
228 return (
int) zend_atol_internal(str, str_len);
232#define convert_object_to_type(op, dst, ctype) \
234 if (Z_OBJ_HT_P(op)->cast_object(Z_OBJ_P(op), dst, ctype) == FAILURE) { \
235 zend_error(E_WARNING, \
236 "Object of class %s could not be converted to %s", ZSTR_VAL(Z_OBJCE_P(op)->name),\
237 zend_get_type_by_const(ctype)); \
247 zend_unwrap_reference(op);
337 bool trailing_data =
false;
373 return _zendi_try_convert_scalar_to_number(op, holder);
390 if (!zend_is_long_compatible(
dval, lval)) {
403 bool trailing_data =
false;
407 true,
NULL, &trailing_data);
426 lval = zend_dval_to_lval_cap(
dval);
427 if (!zend_is_long_compatible(
dval, lval)) {
462 return zendi_try_get_long(op, failed);
465#define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode) \
466 if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \
467 && UNEXPECTED(Z_OBJ_HANDLER_P(op1, do_operation))) { \
468 if (EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op1, do_operation)(opcode, result, op1, op2))) { \
473#define ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(opcode) \
474 if (UNEXPECTED(Z_TYPE_P(op2) == IS_OBJECT) \
475 && UNEXPECTED(Z_OBJ_HANDLER_P(op2, do_operation)) \
476 && EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op2, do_operation)(opcode, result, op1, op2))) { \
480#define ZEND_TRY_BINARY_OBJECT_OPERATION(opcode) \
481 ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode) \
483 ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(opcode)
485#define ZEND_TRY_UNARY_OBJECT_OPERATION(opcode) \
486 if (UNEXPECTED(Z_TYPE_P(op1) == IS_OBJECT) \
487 && UNEXPECTED(Z_OBJ_HANDLER_P(op1, do_operation)) \
488 && EXPECTED(SUCCESS == Z_OBJ_HANDLER_P(op1, do_operation)(opcode, result, op1, NULL))) { \
492#define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, opcode, sigil) \
494 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \
496 if (Z_ISREF_P(op1)) { \
497 op1 = Z_REFVAL_P(op1); \
498 if (Z_TYPE_P(op1) == IS_LONG) { \
499 op1_lval = Z_LVAL_P(op1); \
503 ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode); \
504 op1_lval = zendi_try_get_long(op1, &failed); \
505 if (UNEXPECTED(failed)) { \
506 zend_binop_error(sigil, op1, op2); \
507 if (result != op1) { \
508 ZVAL_UNDEF(result); \
513 op1_lval = Z_LVAL_P(op1); \
517 if (UNEXPECTED(Z_TYPE_P(op2) != IS_LONG)) { \
519 if (Z_ISREF_P(op2)) { \
520 op2 = Z_REFVAL_P(op2); \
521 if (Z_TYPE_P(op2) == IS_LONG) { \
522 op2_lval = Z_LVAL_P(op2); \
526 ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(opcode); \
527 op2_lval = zendi_try_get_long(op2, &failed); \
528 if (UNEXPECTED(failed)) { \
529 zend_binop_error(sigil, op1, op2); \
530 if (result != op1) { \
531 ZVAL_UNDEF(result); \
536 op2_lval = Z_LVAL_P(op2); \
571 tmp = (zend_hash_num_elements(
Z_ARRVAL_P(op))?1:0);
590 zend_unwrap_reference(op);
630 tmp = (zend_hash_num_elements(
Z_ARRVAL_P(op))?1:0);
649 zend_unwrap_reference(op);
702 tmp = (zend_hash_num_elements(
Z_ARRVAL_P(op))?1:0);
721 zend_unwrap_reference(op);
775 zend_unwrap_reference(op);
797static void convert_scalar_to_array(
zval *op)
814 convert_scalar_to_array(op);
824 (
Z_OBJCE_P(op)->default_properties_count ||
842 zend_unwrap_reference(op);
845 convert_scalar_to_array(op);
879 zend_unwrap_reference(op);
919 if (!zend_is_long_compatible(
dval, lval)) {
941 lval = zend_dval_to_lval_cap(
dval);
943 if (!zend_is_long_compatible(
dval, lval)) {
951 return zend_hash_num_elements(
Z_ARRVAL_P(op)) ? 1 : 0;
989 return zend_hash_num_elements(
Z_ARRVAL_P(op)) ? 1.0 : 0.0;
1044 return zend_string_copy(
Z_STR_P(op));
1053 return __zval_get_string_func(op, 0);
1059 return __zval_get_string_func(op, 1);
1122 zval op1_copy, op2_copy;
1125 zend_binop_error(
"+",
op1,
op2);
1136 if (add_function_fast(
result, &op1_copy, &op2_copy) ==
SUCCESS) {
1186 zval op1_copy, op2_copy;
1189 zend_binop_error(
"-",
op1,
op2);
1200 if (sub_function_fast(
result, &op1_copy, &op2_copy) ==
SUCCESS) {
1255 zval op1_copy, op2_copy;
1258 zend_binop_error(
"*",
op1,
op2);
1269 if (mul_function_fast(
result, &op1_copy, &op2_copy) ==
SUCCESS) {
1288static void ZEND_COLD zend_power_base_0_exponent_lt_0_error(
void)
1293static double safe_pow(
double base,
double exponent)
1295 if (
UNEXPECTED(base == 0.0 && exponent < 0.0)) {
1296 zend_power_base_0_exponent_lt_0_error();
1299 return pow(base, exponent);
1313 }
else if (l2 == 0) {
1369 zval op1_copy, op2_copy;
1372 zend_binop_error(
"**",
op1,
op2);
1383 if (pow_function_base(
result, &op1_copy, &op2_copy) ==
SUCCESS) {
1393#define TYPES_NOT_HANDLED 1
1394#define DIV_BY_ZERO 2
1453 zval result_copy, op1_copy, op2_copy;
1456 zend_binop_error(
"/",
op1,
op2);
1463 retval = div_function_base(&result_copy, &op1_copy, &op2_copy);
1488 if (op2_lval == 0) {
1490 if (
EG(current_execute_data) && !
CG(in_compilation)) {
1505 if (op2_lval == -1) {
1518 int op1_val, op2_val;
1600 if (!zend_is_long_compatible(
Z_DVAL_P(
op1), lval)) {
1655 zval *longer, *shorter;
1663 zval_ptr_dtor_str(
result);
1675 str = zend_string_alloc(
Z_STRLEN_P(longer), 0);
1681 zval_ptr_dtor_str(
result);
1690 op1_lval = zendi_try_get_long(
op1, &failed);
1692 zend_binop_error(
"|",
op1,
op2);
1704 op2_lval = zendi_try_get_long(
op2, &failed);
1706 zend_binop_error(
"|",
op1,
op2);
1737 zval *longer, *shorter;
1745 zval_ptr_dtor_str(
result);
1757 str = zend_string_alloc(
Z_STRLEN_P(shorter), 0);
1763 zval_ptr_dtor_str(
result);
1772 op1_lval = zendi_try_get_long(
op1, &failed);
1774 zend_binop_error(
"&",
op1,
op2);
1786 op2_lval = zendi_try_get_long(
op2, &failed);
1788 zend_binop_error(
"&",
op1,
op2);
1819 zval *longer, *shorter;
1827 zval_ptr_dtor_str(
result);
1839 str = zend_string_alloc(
Z_STRLEN_P(shorter), 0);
1845 zval_ptr_dtor_str(
result);
1854 op1_lval = zendi_try_get_long(
op1, &failed);
1856 zend_binop_error(
"^",
op1,
op2);
1868 op2_lval = zendi_try_get_long(
op2, &failed);
1870 zend_binop_error(
"^",
op1,
op2);
1903 if (
EG(current_execute_data) && !
CG(in_compilation)) {
1940 if (
EG(current_execute_data) && !
CG(in_compilation)) {
1965 bool free_op1_string =
false;
1966 bool free_op2_string =
false;
1982 zend_string_release(op1_string);
1983 if (orig_op1 !=
result) {
1988 free_op1_string =
true;
1991 op2_string = op1_string;
1992 goto has_op2_string;
2009 if (!free_op1_string) {
2010 op1_string = zend_string_copy(op1_string);
2011 free_op1_string =
true;
2016 zend_string_release(op1_string);
2017 zend_string_release(op2_string);
2018 if (orig_op1 !=
result) {
2023 free_op2_string =
true;
2030 if (
result == orig_op1) {
2033 if (free_op2_string) {
2036 free_op2_string =
false;
2043 if (
result == orig_op1) {
2046 if (free_op1_string) {
2049 free_op1_string =
false;
2055 size_t op1_len =
ZSTR_LEN(op1_string);
2056 size_t op2_len =
ZSTR_LEN(op2_string);
2057 size_t result_len = op1_len + op2_len;
2062 if (free_op1_string) zend_string_release(op1_string);
2063 if (free_op2_string) zend_string_release(op2_string);
2065 if (orig_op1 !=
result) {
2073 if (free_op1_string) {
2079 free_op1_string =
false;
2082 result_str = zend_string_extend(op1_string, result_len, 0);
2084 if (op1_string == op2_string) {
2085 if (free_op2_string) {
2086 zend_string_release(op2_string);
2087 free_op2_string =
false;
2089 op2_string = result_str;
2092 result_str = zend_string_alloc(result_len, 0);
2094 if (
result == orig_op1) {
2102 ZSTR_VAL(result_str)[result_len] =
'\0';
2105 if (free_op1_string) zend_string_release(op1_string);
2106 if (free_op2_string) zend_string_release(op2_string);
2119 if (case_insensitive) {
2125 zend_tmp_string_release(tmp_str1);
2126 zend_tmp_string_release(tmp_str2);
2146 zend_tmp_string_release(tmp_str1);
2147 zend_tmp_string_release(tmp_str2);
2168 zend_tmp_string_release(tmp_str1);
2169 zend_tmp_string_release(tmp_str2);
2182 zend_tmp_string_release(tmp_str1);
2183 zend_tmp_string_release(tmp_str2);
2192 d1 = zval_get_double(
op1);
2193 d2 = zval_get_double(
op2);
2213 return lval > str_lval ? 1 : lval < str_lval ? -1 : 0;
2223 zend_string_release(lval_as_str);
2245 zend_string_release(dval_as_str);
2253 zval op1_copy, op2_copy;
2352 op1 = _zendi_convert_scalar_to_number_silent(
op1, &op1_copy);
2353 op2 = _zendi_convert_scalar_to_number_silent(
op2, &op2_copy);
2374static int hash_zval_identical_function(
zval *z1,
zval *z2)
2383 return fast_is_not_identical_function(z1, z2);
2466 if (class_ce->
interfaces[i] == interface_ce) {
2477 ZEND_ASSERT(instance_ce != ce &&
"Should have been checked already");
2492 instance_ce = instance_ce->
parent;
2493 if (instance_ce == ce) {
2496 if (instance_ce ==
NULL) {
2514 if (
UNEXPECTED( c <
'0' || c >
'z' || (c <
'a' && c >
'Z') || (c <
'A' && c >
'9') ) ) {
2543 zend_string_addref(zstr);
2546 zend_string_release(zstr);
2562 zend_string_forget_hash_val(
Z_STR_P(str));
2568 if (
ch >=
'a' &&
ch <=
'z') {
2577 }
else if (
ch >=
'A' &&
ch <=
'Z') {
2586 }
else if (
ch >=
'0' &&
ch <=
'9') {
2602 }
while (
pos-- > 0);
2619 zend_string_free(
Z_STR_P(str));
2631 fast_long_increment_function(
op1);
2645 zval_ptr_dtor_str(
op1);
2648 double d = (double)lval;
2655 zval_ptr_dtor_str(
op1);
2660 increment_string(
op1);
2673 zend_error(
E_WARNING,
"Increment on type bool has no effect, this will change in the next major version of PHP");
2719 fast_long_decrement_function(
op1);
2737 zval_ptr_dtor_str(
op1);
2739 double d = (double)lval;
2746 zval_ptr_dtor_str(
op1);
2752 zend_string_addref(zstr);
2755 zend_string_release(zstr);
2767 zend_error(
E_WARNING,
"Decrement on type null has no effect, this will change in the next major version of PHP");
2780 zend_error(
E_WARNING,
"Decrement on type bool has no effect, this will change in the next major version of PHP");
2821 return i_zend_is_true(op);
2839#ifdef ZEND_USE_TOLOWER_L
2840# if defined(ZEND_WIN32) && defined(_MSC_VER)
2841 current_locale = _get_current_locale();
2843 current_locale = uselocale(0);
2846#if defined(ZEND_WIN32) && defined(_MSC_VER)
2847 if (MB_CUR_MAX > 1) {
2848 unsigned int cp = ___lc_codepage_func();
2849 CG(variable_width_locale) = 1;
2851 CG(ascii_compatible_locale) =
2854 CG(variable_width_locale) = 0;
2855 CG(ascii_compatible_locale) = 1;
2857#elif defined(MB_CUR_MAX)
2859 if (MB_CUR_MAX > 1) {
2860#ifdef HAVE_NL_LANGINFO
2864 const char *charmap =
NULL;
2868 const char *dot =
strchr(locale,
'.');
2869 const char *modifier;
2873 modifier =
strchr(dot,
'@');
2876 }
else if (modifier - dot <
sizeof(
buf)) {
2878 buf[modifier - dot] =
'\0';
2884 CG(variable_width_locale) = 1;
2885 CG(ascii_compatible_locale) = 0;
2889 static const char *ascii_compatible_charmaps[] = {
2897 for (
p = ascii_compatible_charmaps; *
p;
p++) {
2899 CG(ascii_compatible_locale) = 1;
2906 CG(variable_width_locale) = 0;
2907 CG(ascii_compatible_locale) = 1;
2911 CG(variable_width_locale) = 1;
2912 CG(ascii_compatible_locale) = 0;
2926static zend_always_inline void zend_str_tolower_impl(
char *dest,
const char *str,
size_t length) {
2927 unsigned char *
p = (
unsigned char*)str;
2928 unsigned char *q = (
unsigned char*)dest;
2929 unsigned char *
end =
p + length;
2930#ifdef HAVE_BLOCKCONV
2931 if (length >= BLOCKCONV_STRIDE) {
2932 BLOCKCONV_INIT_RANGE(
'A',
'Z');
2933 BLOCKCONV_INIT_DELTA(
'a' -
'A');
2937 p += BLOCKCONV_STRIDE;
2938 q += BLOCKCONV_STRIDE;
2939 }
while (
p + BLOCKCONV_STRIDE <=
end);
2948static zend_always_inline void zend_str_toupper_impl(
char *dest,
const char *str,
size_t length) {
2949 unsigned char *
p = (
unsigned char*)str;
2950 unsigned char *q = (
unsigned char*)dest;
2951 unsigned char *
end =
p + length;
2952#ifdef HAVE_BLOCKCONV
2953 if (length >= BLOCKCONV_STRIDE) {
2954 BLOCKCONV_INIT_RANGE(
'a',
'z');
2955 BLOCKCONV_INIT_DELTA(
'A' -
'a');
2959 p += BLOCKCONV_STRIDE;
2960 q += BLOCKCONV_STRIDE;
2961 }
while (
p + BLOCKCONV_STRIDE <=
end);
2972 zend_str_tolower_impl(dest, source, length);
2973 dest[length] =
'\0';
2980 zend_str_toupper_impl(dest, source, length);
2981 dest[length] =
'\0';
3000 zend_str_tolower_impl(str, (
const char*)str, length);
3006 zend_str_toupper_impl(str, (
const char*)str, length);
3013 const unsigned char *
p = (
const unsigned char*)source;
3014 const unsigned char *
end =
p + length;
3021 if (
p != (
const unsigned char*)source) {
3022 memcpy(
res, source,
p - (
const unsigned char*)source);
3024 r = (
unsigned char*)
p + (
res - source);
3025 zend_str_tolower_impl((
char *)r, (
const char*)
p,
end -
p);
3037 const unsigned char *
p = (
const unsigned char*)source;
3038 const unsigned char *
end =
p + length;
3045 if (
p != (
const unsigned char*)source) {
3046 memcpy(
res, source,
p - (
const unsigned char*)source);
3048 r = (
unsigned char*)
p + (
res - source);
3049 zend_str_toupper_impl((
char *)r, (
const char*)
p,
end -
p);
3062 unsigned char *
p = (
unsigned char *)
ZSTR_VAL(str);
3063 unsigned char *
end =
p + length;
3065#ifdef HAVE_BLOCKCONV
3066 BLOCKCONV_INIT_RANGE(
'A',
'Z');
3067 while (
p + BLOCKCONV_STRIDE <=
end) {
3069 if (BLOCKCONV_FOUND()) {
3075 BLOCKCONV_INIT_DELTA(
'a' -
'A');
3079 p += BLOCKCONV_STRIDE;
3080 q += BLOCKCONV_STRIDE;
3081 zend_str_tolower_impl((
char *) q, (
const char *)
p,
end -
p);
3085 p += BLOCKCONV_STRIDE;
3104 return zend_string_copy(str);
3111 unsigned char *
p = (
unsigned char *)
ZSTR_VAL(str);
3112 unsigned char *
end =
p + length;
3114#ifdef HAVE_BLOCKCONV
3115 BLOCKCONV_INIT_RANGE(
'a',
'z');
3116 while (
p + BLOCKCONV_STRIDE <=
end) {
3118 if (BLOCKCONV_FOUND()) {
3124 BLOCKCONV_INIT_DELTA(
'A' -
'a');
3128 p += BLOCKCONV_STRIDE;
3129 q += BLOCKCONV_STRIDE;
3130 zend_str_toupper_impl((
char *) q, (
const char *)
p,
end -
p);
3134 p += BLOCKCONV_STRIDE;
3153 return zend_string_copy(str);
3164 retval = memcmp(s1, s2,
MIN(len1, len2));
3292 double dval1 = 0.0, dval2 = 0.0;
3294 if ((ret1 = is_numeric_string_ex(s1->
val, s1->
len, &lval1, &dval1,
false, &oflow1,
NULL)) &&
3295 (ret2 = is_numeric_string_ex(s2->
val, s2->
len, &lval2, &dval2,
false, &oflow2,
NULL))) {
3296#if ZEND_ULONG_MAX == 0xFFFFFFFF
3297 if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
3298 ((oflow1 == 1 && dval1 > 9007199254740991. )
3299 || (oflow1 == -1 && dval1 < -9007199254740991.))) {
3301 if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) {
3313 dval1 = (double) lval1;
3318 dval2 = (double) lval2;
3319 }
else if (dval1 == dval2 && !
zend_finite(dval1)) {
3324 return dval1 == dval2;
3326 return lval1 == lval2;
3330 return zend_string_equal_content(s1, s2);
3340 double dval1 = 0.0, dval2 = 0.0;
3342 if ((ret1 = is_numeric_string_ex(s1->
val, s1->
len, &lval1, &dval1,
false, &oflow1,
NULL)) &&
3343 (ret2 = is_numeric_string_ex(s2->
val, s2->
len, &lval2, &dval2,
false, &oflow2,
NULL))) {
3344#if ZEND_ULONG_MAX == 0xFFFFFFFF
3345 if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0. &&
3346 ((oflow1 == 1 && dval1 > 9007199254740991. )
3347 || (oflow1 == -1 && dval1 < -9007199254740991.))) {
3349 if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) {
3361 dval1 = (double) lval1;
3366 dval2 = (double) lval2;
3367 }
else if (dval1 == dval2 && !
zend_finite(dval1)) {
3372 dval1 = dval1 - dval2;
3375 return lval1 > lval2 ? 1 : (lval1 < lval2 ? -1 : 0);
3386static int hash_zval_compare_function(
zval *z1,
zval *z2)
3424 char *
res = zend_print_long_to_buf(
buf +
sizeof(
buf) - 1, num);
3438 char *
res = zend_print_ulong_to_buf(
buf +
sizeof(
buf) - 1, num);
3447#if SIZEOF_ZEND_LONG == 8
3448 return zend_print_ulong_to_buf(
buf, num64);
3452 *--
buf = (char) (num64 % 10) +
'0';
3458 *--
buf = (char) (num % 10) +
'0';
3468 char *
result = zend_print_u64_to_buf(
buf, ~((uint64_t) num) + 1);
3472 return zend_print_u64_to_buf(
buf, num);
3482 char *
res = zend_print_u64_to_buf(
buf +
sizeof(
buf) - 1, num);
3491 if ((uint64_t)num <= 9) {
3495 char *
res = zend_print_i64_to_buf(
buf +
sizeof(
buf) - 1, num);
3506 int precision = (int)
EG(precision);
3507 zend_gcvt(num, precision ? precision : 1,
'.',
'E',
buf);
3520 double *
dval,
bool allow_errors,
int *oflow_info,
bool *trailing_data)
3523 int digits = 0, dp_or_e = 0;
3524 double local_dval = 0.0;
3533 if (oflow_info !=
NULL) {
3536 if (trailing_data !=
NULL) {
3537 *trailing_data =
false;
3542 while (*str ==
' ' || *str ==
'\t' || *str ==
'\n' || *str ==
'\r' || *str ==
'\v' || *str ==
'\f') {
3551 }
else if (*
ptr ==
'+') {
3557 while (*
ptr ==
'0') {
3567 tmp_lval = tmp_lval * 10 + (*ptr) -
'0';
3569 }
else if (*
ptr ==
'.' && dp_or_e < 1) {
3570 goto process_double;
3571 }
else if ((*
ptr ==
'e' || *
ptr ==
'E') && dp_or_e < 2) {
3572 const char *e =
ptr + 1;
3574 if (*e ==
'-' || *e ==
'+') {
3578 goto process_double;
3586 if (oflow_info !=
NULL) {
3587 *oflow_info = *str ==
'-' ? -1 : 1;
3590 goto process_double;
3600 }
else if (!allow_errors && dp_or_e != -1) {
3601 dp_or_e = (*
ptr++ ==
'.') ? 1 : 2;
3608 if (
ptr != str + length) {
3614 if (
ptr != str + length) {
3615 if (!allow_errors) {
3618 if (trailing_data !=
NULL) {
3619 *trailing_data =
true;
3626 int cmp =
strcmp(&
ptr[-digits], long_min_digits);
3628 if (!(cmp < 0 || (cmp == 0 && *str ==
'-'))) {
3632 if (oflow_info !=
NULL) {
3633 *oflow_info = *str ==
'-' ? -1 : 1;
3642 tmp_lval = -tmp_lval;
3662static zend_always_inline void zend_memnstr_ex_pre(
unsigned int td[],
const char *needle,
size_t needle_len,
int reverse) {
3665 for (i = 0; i < 256; i++) {
3666 td[i] = needle_len + 1;
3670 for (i = needle_len - 1; i >= 0; i--) {
3671 td[(
unsigned char)needle[i]] = i + 1;
3676 for (i = 0; i < needle_len; i++) {
3677 td[(
unsigned char)needle[i]] = (
int)needle_len - i;
3685 unsigned int td[256];
3689 if (needle_len == 0 || (
end - haystack) < needle_len) {
3693 zend_memnstr_ex_pre(td, needle, needle_len, 0);
3699 for (i = 0; i < needle_len; i++) {
3700 if (needle[i] !=
p[i]) {
3704 if (i == needle_len) {
3710 p += td[(
unsigned char)(
p[needle_len])];
3719 unsigned int td[256];
3723 if (needle_len == 0 || (
end - haystack) < needle_len) {
3727 zend_memnstr_ex_pre(td, needle, needle_len, 1);
3732 while (
p >= haystack) {
3733 for (i = 0; i < needle_len; i++) {
3734 if (needle[i] !=
p[i]) {
3739 if (i == needle_len) {
3740 return (
const char *)
p;
3747 p -= td[(
unsigned char)(
p[-1])];
3754#if SIZEOF_ZEND_LONG == 4
3757 double two_pow_32 =
pow(2., 32.),
3760 dmod =
fmod(d, two_pow_32);
3764 dmod =
ceil(dmod) + two_pow_32;
3771 double two_pow_64 =
pow(2., 64.),
3774 dmod =
fmod(d, two_pow_64);
setlocale(int $category, $locales,... $rest)
strcoll(string $string1, string $string2)
copy(string $from, string $to, $context=null)
fmod(float $num1, float $num2)
pow(mixed $num, mixed $exponent)
strchr(string $haystack, string $needle, bool $before_needle=false)
zend_ffi_ctype_name_buf buf
unsigned const char * end
unsigned const char * pos
zend_class_entry ** interfaces
zend_class_entry * parent
ZEND_API ZEND_COLD void zend_error_unchecked(int type, const char *format,...)
ZEND_API zend_string * zend_strpprintf(size_t max_len, const char *format,...)
ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char *format,...)
ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const char *format,...)
ZEND_API zend_class_entry * zend_standard_class_def
ZEND_API ZEND_COLD void zend_type_error(const char *format,...)
ZEND_API ZEND_COLD void zend_error(int type, const char *format,...)
ZEND_API const char * zend_zval_value_name(const zval *arg)
ZEND_API const char * zend_zval_type_name(const zval *arg)
ZEND_API void object_init(zval *arg)
#define ZVAL_EMPTY_STRING(z)
strcmp(string $string1, string $string2)
ZEND_API zend_class_entry * zend_ce_closure
zend_string_release_ex(func->internal_function.function_name, 0)
#define ZEND_ACC_INTERFACE
#define ZEND_ACC_RESOLVED_INTERFACES
#define E_RECOVERABLE_ERROR
ZEND_API zend_class_entry * zend_ce_arithmetic_error
ZEND_API zend_class_entry * zend_ce_division_by_zero_error
ZEND_API ZEND_COLD zend_object * zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format,...)
ZEND_API HashTable *ZEND_FASTCALL zend_proptable_to_symtable(HashTable *ht, bool always_duplicate)
ZEND_API HashTable *ZEND_FASTCALL zend_symtable_to_proptable(HashTable *ht)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_add_new(HashTable *ht, zend_ulong h, zval *pData)
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, bool ordered)
ZEND_API void ZEND_FASTCALL zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, bool overwrite)
ZEND_API zval *ZEND_FASTCALL zend_hash_add_new(HashTable *ht, zend_string *key, zval *pData)
ZEND_API HashTable *ZEND_FASTCALL zend_array_dup(HashTable *source)
#define zend_new_array(size)
#define MAX_LENGTH_OF_LONG
#define ZEND_STRTOL(s0, s1, base)
struct _zend_string zend_string
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval)
ZEND_API HashTable * zend_get_properties_for(zval *obj, zend_prop_purpose purpose)
ZEND_API const zend_object_handlers std_object_handlers
ZEND_API HashTable * zend_std_build_object_properties_array(zend_object *zobj)
#define zend_release_properties(ht)
@ ZEND_PROP_PURPOSE_ARRAY_CAST
#define ZEND_STD_BUILD_OBJECT_PROPERTIES_ARRAY_COMPATIBLE(object)
ZEND_API zend_object *ZEND_FASTCALL zend_objects_new(zend_class_entry *ce)
ZEND_API const unsigned char zend_tolower_map[256]
#define convert_object_to_type(op, dst, ctype)
#define TYPES_NOT_HANDLED
ZEND_API int ZEND_FASTCALL zend_compare_arrays(zval *a1, zval *a2)
ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2)
#define ZEND_TRY_BINARY_OBJECT_OPERATION(opcode)
ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1)
ZEND_API zend_result ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2)
ZEND_API bool ZEND_FASTCALL zend_is_identical(const zval *op1, const zval *op2)
ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2)
ZEND_API const unsigned char zend_toupper_map[256]
#define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, result, opcode, sigil)
ZEND_API zend_result ZEND_FASTCALL boolean_not_function(zval *result, zval *op1)
ZEND_API zend_result ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2)
ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, bool case_insensitive)
ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp(const char *s1, size_t len1, const char *s2, size_t len2)
ZEND_API zend_string *ZEND_FASTCALL zend_long_to_str(zend_long num)
ZEND_API const char *ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end)
ZEND_API char *ZEND_FASTCALL zend_str_toupper_dup_ex(const char *source, size_t length)
ZEND_API bool ZEND_FASTCALL zend_object_is_true(const zval *op)
ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len)
ZEND_API zend_result ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2)
#define ZEND_TRY_BINARY_OP1_OBJECT_OPERATION(opcode)
ZEND_API int ZEND_FASTCALL zend_binary_strncmp(const char *s1, size_t len1, const char *s2, size_t len2, size_t length)
ZEND_API void ZEND_FASTCALL convert_to_boolean(zval *op)
ZEND_API zend_result ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2)
#define ZEND_TRY_UNARY_OBJECT_OPERATION(opcode)
ZEND_API void ZEND_COLD zend_incompatible_double_to_long_error(double d)
ZEND_API void ZEND_FASTCALL _convert_to_string(zval *op)
ZEND_API void ZEND_FASTCALL zend_str_toupper(char *str, size_t length)
ZEND_API int ZEND_FASTCALL zend_binary_strcmp(const char *s1, size_t len1, const char *s2, size_t len2)
ZEND_API void ZEND_COLD zend_incompatible_string_to_long_error(const zend_string *s)
ZEND_API bool zend_string_only_has_ascii_alphanumeric(const zend_string *str)
ZEND_API zend_result ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1)
ZEND_API zend_result ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2)
#define TYPE_PAIR(t1, t2)
ZEND_API zend_result ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_result ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2)
ZEND_API void ZEND_FASTCALL convert_to_array(zval *op)
ZEND_API zend_result ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2)
ZEND_API char *ZEND_FASTCALL zend_str_tolower_copy(char *dest, const char *source, size_t length)
ZEND_API zend_result ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2)
ZEND_API int ZEND_FASTCALL zend_compare(zval *op1, zval *op2)
ZEND_API zend_string *ZEND_FASTCALL zval_try_get_string_func(zval *op)
ZEND_API bool ZEND_FASTCALL _try_convert_to_string(zval *op)
ZEND_API bool ZEND_FASTCALL instanceof_function_slow(const zend_class_entry *instance_ce, const zend_class_entry *ce)
ZEND_API zend_long ZEND_FASTCALL zend_dval_to_lval_slow(double d)
ZEND_API int ZEND_FASTCALL zendi_smart_strcmp(zend_string *s1, zend_string *s2)
ZEND_API zend_string *ZEND_FASTCALL zend_u64_to_str(uint64_t num)
ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len)
ZEND_API int ZEND_FASTCALL zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3)
ZEND_API zend_result ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2)
ZEND_API char *ZEND_FASTCALL zend_str_tolower_dup_ex(const char *source, size_t length)
ZEND_API zend_string *ZEND_FASTCALL zend_string_tolower_ex(zend_string *str, bool persistent)
ZEND_API zend_string *ZEND_FASTCALL zend_i64_to_str(int64_t num)
ZEND_API zend_result ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_long ZEND_FASTCALL zval_get_long_func(const zval *op, bool is_strict)
ZEND_API zend_result ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2)
ZEND_API const char *ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const char *needle, size_t needle_len, const char *end)
ZEND_API uint8_t ZEND_FASTCALL _is_numeric_string_ex(const char *str, size_t length, zend_long *lval, double *dval, bool allow_errors, int *oflow_info, bool *trailing_data)
ZEND_API void ZEND_FASTCALL convert_to_double(zval *op)
ZEND_API bool ZEND_FASTCALL zendi_smart_streq(zend_string *s1, zend_string *s2)
ZEND_API zend_result ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2)
ZEND_API bool ZEND_FASTCALL zend_is_true(const zval *op)
#define ZEND_TRY_BINARY_OP2_OBJECT_OPERATION(opcode)
ZEND_API void ZEND_FASTCALL convert_to_object(zval *op)
ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1)
ZEND_API char *ZEND_FASTCALL zend_str_tolower_dup(const char *source, size_t length)
ZEND_API zend_result ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_result ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2)
ZEND_API int ZEND_FASTCALL zend_compare_symbol_tables(HashTable *ht1, HashTable *ht2)
ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp_l(const char *s1, size_t len1, const char *s2, size_t len2, size_t length)
ZEND_API int ZEND_FASTCALL zend_binary_zval_strcmp(zval *s1, zval *s2)
ZEND_API uint8_t ZEND_FASTCALL is_numeric_str_function(const zend_string *str, zend_long *lval, double *dval)
ZEND_API char *ZEND_FASTCALL zend_str_toupper_copy(char *dest, const char *source, size_t length)
ZEND_API void zend_reset_lc_ctype_locale(void)
ZEND_API zend_result ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2)
ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2)
ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2)
ZEND_API zend_long ZEND_FASTCALL zval_try_get_long(const zval *op, bool *failed)
ZEND_API zend_result ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2)
ZEND_API void zend_update_current_locale(void)
ZEND_API zend_result ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2)
ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length)
ZEND_API double ZEND_FASTCALL zval_get_double_func(const zval *op)
ZEND_API zend_string *ZEND_FASTCALL zval_get_string_func(zval *op)
ZEND_API void ZEND_FASTCALL convert_to_null(zval *op)
ZEND_API void ZEND_FASTCALL convert_scalar_to_number(zval *op)
ZEND_API zend_result ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2)
ZEND_API bool ZEND_FASTCALL zend_class_implements_interface(const zend_class_entry *class_ce, const zend_class_entry *interface_ce)
ZEND_API zend_string *ZEND_FASTCALL zend_ulong_to_str(zend_ulong num)
ZEND_API zend_result ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2)
ZEND_API zend_string *ZEND_FASTCALL zend_string_toupper_ex(zend_string *str, bool persistent)
ZEND_API void ZEND_FASTCALL convert_to_long(zval *op)
ZEND_API int ZEND_FASTCALL zend_compare_objects(zval *o1, zval *o2)
ZEND_API zend_string *ZEND_FASTCALL zend_double_to_str(double num)
ZEND_API int ZEND_FASTCALL zend_binary_strncasecmp(const char *s1, size_t len1, const char *s2, size_t len2, size_t length)
ZEND_API int ZEND_FASTCALL zend_binary_strcasecmp_l(const char *s1, size_t len1, const char *s2, size_t len2)
ZEND_API char *ZEND_FASTCALL zend_str_toupper_dup(const char *source, size_t length)
#define zend_toupper_ascii(c)
#define zend_tolower_ascii(c)
#define ZEND_NORMALIZE_BOOL(n)
#define zend_never_inline
#define EXPECTED(condition)
#define ZEND_THREEWAY_COMPARE(a, b)
#define zend_always_inline
#define ZEND_UNREACHABLE()
#define EMPTY_SWITCH_DEFAULT_CASE()
#define UNEXPECTED(condition)
struct _zend_class_entry zend_class_entry
struct _zend_object zend_object
#define ZSTR_GET_COPYABLE_CONCAT_PROPERTIES_BOTH(s1, s2)
#define ZSTR_EMPTY_ALLOC()
ZEND_API double zend_strtod(const char *s00, const char **se)
ZEND_API char * zend_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf)
#define ZEND_DOUBLE_MAX_LENGTH
#define Z_OBJ_HANDLER_P(zv_p, hf)
int(* compare_func_t)(const void *, const void *)
#define Z_ISREF_P(zval_p)
#define Z_REFVAL_P(zval_p)
#define Z_STRVAL_P(zval_p)
#define Z_ARRVAL_P(zval_p)
#define Z_REFCOUNTED_P(zval_p)
#define ZVAL_STR_COPY(z, s)
struct _zend_array HashTable
#define Z_OBJ_HT_P(zval_p)
#define Z_TYPE_INFO_P(zval_p)
#define IS_STR_VALID_UTF8
#define Z_STRLEN_P(zval_p)
#define Z_OBJCE_P(zval_p)
#define Z_RES_HANDLE_P(zval_p)
#define ZVAL_NEW_STR(z, s)
#define Z_TYPE_INFO(zval)
#define Z_OBJPROP_P(zval_p)
#define ZVAL_DOUBLE(z, d)
ZEND_RESULT_CODE zend_result
#define IS_ARRAY_IMMUTABLE
#define SEPARATE_ARRAY(zv)
#define GC_IS_RECURSIVE(p)
#define ZVAL_INTERNED_STR(z, s)
#define ZVAL_COPY_VALUE(z, v)
#define GC_ADD_FLAGS(p, flags)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)
ZEND_API void zval_add_ref(zval *p)