Lines Matching refs:op1
257 #define convert_op1_op2_long(op1, op1_lval, op2, op2_lval, op, op_func) \ argument
259 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { \
260 if (Z_ISREF_P(op1)) { \
261 op1 = Z_REFVAL_P(op1); \
262 if (Z_TYPE_P(op1) == IS_LONG) { \
263 op1_lval = Z_LVAL_P(op1); \
268 op1_lval = _zval_get_long_func_noisy(op1); \
273 op1_lval = Z_LVAL_P(op1); \
915 ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* {{{ */ in add_function() argument
921 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in add_function()
923 fast_long_add_function(result, op1, op2); in add_function()
926 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function()
930 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function()
934 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function()
938 if ((result == op1) && (result == op2)) { in add_function()
942 if (result != op1) { in add_function()
943 ZVAL_DUP(result, op1); in add_function()
949 if (Z_ISREF_P(op1)) { in add_function()
950 op1 = Z_REFVAL_P(op1); in add_function()
956 if (EXPECTED(op1 != op2)) { in add_function()
957 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in add_function()
960 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in add_function()
961 op2 = op1; in add_function()
973 ZEND_API int ZEND_FASTCALL sub_function(zval *result, zval *op1, zval *op2) /* {{{ */ in sub_function() argument
979 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in sub_function()
981 fast_long_sub_function(result, op1, op2); in sub_function()
984 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function()
988 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function()
992 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function()
996 if (Z_ISREF_P(op1)) { in sub_function()
997 op1 = Z_REFVAL_P(op1); in sub_function()
1003 if (EXPECTED(op1 != op2)) { in sub_function()
1004 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in sub_function()
1007 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in sub_function()
1008 op2 = op1; in sub_function()
1020 ZEND_API int ZEND_FASTCALL mul_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mul_function() argument
1026 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in mul_function()
1030 …ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1),Z_LVAL_P(op2), Z_LVAL_P(result),Z_DVAL_P(result),overflow); in mul_function()
1036 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function()
1040 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function()
1044 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function()
1048 if (Z_ISREF_P(op1)) { in mul_function()
1049 op1 = Z_REFVAL_P(op1); in mul_function()
1055 if (EXPECTED(op1 != op2)) { in mul_function()
1056 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in mul_function()
1059 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in mul_function()
1060 op2 = op1; in mul_function()
1072 ZEND_API int ZEND_FASTCALL pow_function(zval *result, zval *op1, zval *op2) /* {{{ */ in pow_function() argument
1078 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in pow_function()
1081 zend_long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function()
1114 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1119 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1123 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1127 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1131 if (Z_ISREF_P(op1)) { in pow_function()
1132 op1 = Z_REFVAL_P(op1); in pow_function()
1138 if (EXPECTED(op1 != op2)) { in pow_function()
1139 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1143 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in pow_function()
1152 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1156 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in pow_function()
1158 op2 = op1; in pow_function()
1170 ZEND_API int ZEND_FASTCALL div_function(zval *result, zval *op1, zval *op2) /* {{{ */ in div_function() argument
1176 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in div_function()
1180 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1) / (double) Z_LVAL_P(op2))); in div_function()
1182 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == ZEND_LONG_MIN) { in div_function()
1187 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function()
1188 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function()
1190 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function()
1198 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function()
1205 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1212 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1216 if (Z_ISREF_P(op1)) { in div_function()
1217 op1 = Z_REFVAL_P(op1); in div_function()
1223 if (EXPECTED(op1 != op2)) { in div_function()
1224 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in div_function()
1227 zendi_convert_scalar_to_number(op1, op1_copy, result, 0); in div_function()
1228 op2 = op1; in div_function()
1240 ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {{{ */ in mod_function() argument
1244 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_MOD, mod_function); in mod_function()
1253 if (op1 != result) { in mod_function()
1259 if (op1 == result) { in mod_function()
1274 ZEND_API int ZEND_FASTCALL boolean_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in boolean_xor_function() argument
1279 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1281 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1284 if (Z_ISREF_P(op1)) { in boolean_xor_function()
1285 op1 = Z_REFVAL_P(op1); in boolean_xor_function()
1286 if (Z_TYPE_P(op1) == IS_FALSE) { in boolean_xor_function()
1289 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_xor_function()
1295 op1_val = zval_is_true(op1); in boolean_xor_function()
1324 ZEND_API int ZEND_FASTCALL boolean_not_function(zval *result, zval *op1) /* {{{ */ in boolean_not_function() argument
1326 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1328 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1331 if (Z_ISREF_P(op1)) { in boolean_not_function()
1332 op1 = Z_REFVAL_P(op1); in boolean_not_function()
1333 if (Z_TYPE_P(op1) < IS_TRUE) { in boolean_not_function()
1336 } else if (EXPECTED(Z_TYPE_P(op1) == IS_TRUE)) { in boolean_not_function()
1343 ZVAL_BOOL(result, !zval_is_true(op1)); in boolean_not_function()
1349 ZEND_API int ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) /* {{{ */ in bitwise_not_function() argument
1352 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1354 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1357 ZVAL_LONG(result, ~zend_dval_to_lval(Z_DVAL_P(op1))); in bitwise_not_function()
1362 if (Z_STRLEN_P(op1) == 1) { in bitwise_not_function()
1363 zend_uchar not = (zend_uchar) ~*Z_STRVAL_P(op1); in bitwise_not_function()
1370 ZVAL_NEW_STR(result, zend_string_alloc(Z_STRLEN_P(op1), 0)); in bitwise_not_function()
1371 for (i = 0; i < Z_STRLEN_P(op1); i++) { in bitwise_not_function()
1372 Z_STRVAL_P(result)[i] = ~Z_STRVAL_P(op1)[i]; in bitwise_not_function()
1379 op1 = Z_REFVAL_P(op1); in bitwise_not_function()
1390 ZEND_API int ZEND_FASTCALL bitwise_or_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_or_function() argument
1394 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_or_function()
1395 ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2)); in bitwise_or_function()
1399 ZVAL_DEREF(op1); in bitwise_or_function()
1402 if (Z_TYPE_P(op1) == IS_STRING && EXPECTED(Z_TYPE_P(op2) == IS_STRING)) { in bitwise_or_function()
1407 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_or_function()
1408 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_or_function()
1409 zend_uchar or = (zend_uchar) (*Z_STRVAL_P(op1) | *Z_STRVAL_P(op2)); in bitwise_or_function()
1410 if (result==op1) { in bitwise_or_function()
1420 longer = op1; in bitwise_or_function()
1424 shorter = op1; in bitwise_or_function()
1432 if (result==op1) { in bitwise_or_function()
1439 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_or_function()
1441 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_or_function()
1446 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1458 if (op1 == result) { in bitwise_or_function()
1466 ZEND_API int ZEND_FASTCALL bitwise_and_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_and_function() argument
1470 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_and_function()
1471 ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2)); in bitwise_and_function()
1475 ZVAL_DEREF(op1); in bitwise_and_function()
1478 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1483 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_and_function()
1484 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_and_function()
1485 zend_uchar and = (zend_uchar) (*Z_STRVAL_P(op1) & *Z_STRVAL_P(op2)); in bitwise_and_function()
1486 if (result==op1) { in bitwise_and_function()
1496 longer = op1; in bitwise_and_function()
1500 shorter = op1; in bitwise_and_function()
1508 if (result==op1) { in bitwise_and_function()
1515 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_and_function()
1517 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_and_function()
1522 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1534 if (op1 == result) { in bitwise_and_function()
1542 ZEND_API int ZEND_FASTCALL bitwise_xor_function(zval *result, zval *op1, zval *op2) /* {{{ */ in bitwise_xor_function() argument
1546 if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && EXPECTED(Z_TYPE_P(op2) == IS_LONG)) { in bitwise_xor_function()
1547 ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2)); in bitwise_xor_function()
1551 ZVAL_DEREF(op1); in bitwise_xor_function()
1554 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1559 if (EXPECTED(Z_STRLEN_P(op1) >= Z_STRLEN_P(op2))) { in bitwise_xor_function()
1560 if (EXPECTED(Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) && Z_STRLEN_P(op1) == 1) { in bitwise_xor_function()
1561 zend_uchar xor = (zend_uchar) (*Z_STRVAL_P(op1) ^ *Z_STRVAL_P(op2)); in bitwise_xor_function()
1562 if (result==op1) { in bitwise_xor_function()
1572 longer = op1; in bitwise_xor_function()
1576 shorter = op1; in bitwise_xor_function()
1584 if (result==op1) { in bitwise_xor_function()
1591 if (UNEXPECTED(Z_TYPE_P(op1) != IS_LONG)) { in bitwise_xor_function()
1593 op1_lval = _zval_get_long_func_noisy(op1); in bitwise_xor_function()
1598 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1610 if (op1 == result) { in bitwise_xor_function()
1618 ZEND_API int ZEND_FASTCALL shift_left_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_left_function() argument
1622 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_SL, shift_left_function); in shift_left_function()
1627 if (op1 == result) { in shift_left_function()
1638 if (op1 != result) { in shift_left_function()
1645 if (op1 == result) { in shift_left_function()
1654 ZEND_API int ZEND_FASTCALL shift_right_function(zval *result, zval *op1, zval *op2) /* {{{ */ in shift_right_function() argument
1658 convert_op1_op2_long(op1, op1_lval, op2, op2_lval, ZEND_SR, shift_right_function); in shift_right_function()
1663 if (op1 == result) { in shift_right_function()
1674 if (op1 != result) { in shift_right_function()
1681 if (op1 == result) { in shift_right_function()
1690 ZEND_API int ZEND_FASTCALL concat_function(zval *result, zval *op1, zval *op2) /* {{{ */ in concat_function() argument
1692 zval *orig_op1 = op1; in concat_function()
1697 if (UNEXPECTED(Z_TYPE_P(op1) != IS_STRING)) { in concat_function()
1698 if (Z_ISREF_P(op1)) { in concat_function()
1699 op1 = Z_REFVAL_P(op1); in concat_function()
1700 if (Z_TYPE_P(op1) == IS_STRING) break; in concat_function()
1703 use_copy1 = zend_make_printable_zval(op1, &op1_copy); in concat_function()
1709 if (result == op1) { in concat_function()
1710 if (UNEXPECTED(op1 == op2)) { in concat_function()
1714 op1 = &op1_copy; in concat_function()
1729 zval_dtor(op1); in concat_function()
1740 size_t op1_len = Z_STRLEN_P(op1); in concat_function()
1748 zval_dtor(op1); in concat_function()
1759 if (result == op1 && Z_REFCOUNTED_P(result)) { in concat_function()
1764 memcpy(ZSTR_VAL(result_str), Z_STRVAL_P(op1), op1_len); in concat_function()
1780 zval_dtor(op1); in concat_function()
1789 ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensit… in string_compare_function_ex() argument
1791 zend_string *str1 = zval_get_string(op1); in string_compare_function_ex()
1807 ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2) /* {{{ */ in string_compare_function() argument
1809 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_compare_function()
1811 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_compare_function()
1814 return zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in string_compare_function()
1817 zend_string *str1 = zval_get_string(op1); in string_compare_function()
1828 ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2) /* {{{ */ in string_case_compare_function() argument
1830 if (EXPECTED(Z_TYPE_P(op1) == IS_STRING) && in string_case_compare_function()
1832 if (Z_STR_P(op1) == Z_STR_P(op2)) { in string_case_compare_function()
1835 …return zend_binary_strcasecmp_l(Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)… in string_case_compare_function()
1838 zend_string *str1 = zval_get_string(op1); in string_case_compare_function()
1850 ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */ in string_locale_compare_function() argument
1852 zend_string *str1 = zval_get_string(op1); in string_locale_compare_function()
1863 ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */ in numeric_compare_function() argument
1867 d1 = zval_get_double(op1); in numeric_compare_function()
1896 ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ in compare_function() argument
1904 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in compare_function()
1906 ZVAL_LONG(result, Z_LVAL_P(op1)>Z_LVAL_P(op2)?1:(Z_LVAL_P(op1)<Z_LVAL_P(op2)?-1:0)); in compare_function()
1910 Z_DVAL_P(result) = Z_DVAL_P(op1) - (double)Z_LVAL_P(op2); in compare_function()
1915 Z_DVAL_P(result) = (double)Z_LVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1920 if (Z_DVAL_P(op1) == Z_DVAL_P(op2)) { in compare_function()
1923 Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1929 ZVAL_LONG(result, zend_compare_arrays(op1, op2)); in compare_function()
1949 if (Z_STR_P(op1) == Z_STR_P(op2)) { in compare_function()
1953 ZVAL_LONG(result, zendi_smart_strcmp(Z_STR_P(op1), Z_STR_P(op2))); in compare_function()
1961 ZVAL_LONG(result, Z_STRLEN_P(op1) == 0 ? 0 : 1); in compare_function()
1973 if (Z_ISREF_P(op1)) { in compare_function()
1974 op1 = Z_REFVAL_P(op1); in compare_function()
1981 if (Z_TYPE_P(op1) == IS_OBJECT && Z_OBJ_HANDLER_P(op1, compare)) { in compare_function()
1982 ret = Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2); in compare_function()
1988 ret = Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2); in compare_function()
1995 if (Z_TYPE_P(op1) == IS_OBJECT && Z_TYPE_P(op2) == IS_OBJECT) { in compare_function()
1996 if (Z_OBJ_P(op1) == Z_OBJ_P(op2)) { in compare_function()
2001 if (Z_OBJ_HANDLER_P(op1, compare_objects) == Z_OBJ_HANDLER_P(op2, compare_objects)) { in compare_function()
2002 ZVAL_LONG(result, Z_OBJ_HANDLER_P(op1, compare_objects)(op1, op2)); in compare_function()
2006 if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2007 if (Z_OBJ_HT_P(op1)->get) { in compare_function()
2009 op_free = Z_OBJ_HT_P(op1)->get(op1, &rv); in compare_function()
2013 } else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) { in compare_function()
2015 …if (Z_OBJ_HT_P(op1)->cast_object(op1, &tmp_free, ((Z_TYPE_P(op2) == IS_FALSE || Z_TYPE_P(op2) == I… in compare_function()
2029 ret = compare_function(result, op1, op_free); in compare_function()
2032 } else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) { in compare_function()
2034 …->cast_object(op2, &tmp_free, ((Z_TYPE_P(op1) == IS_FALSE || Z_TYPE_P(op1) == IS_TRUE) ? _IS_BOOL … in compare_function()
2039 ret = compare_function(result, op1, &tmp_free); in compare_function()
2042 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
2048 if (Z_TYPE_P(op1) == IS_NULL || Z_TYPE_P(op1) == IS_FALSE) { in compare_function()
2052 ZVAL_LONG(result, zval_is_true(op1) ? 1 : 0); in compare_function()
2054 } else if (Z_TYPE_P(op1) == IS_TRUE) { in compare_function()
2058 ZVAL_LONG(result, zval_is_true(op1) ? 0 : -1); in compare_function()
2061 zendi_convert_scalar_to_number(op1, op1_copy, result, 1); in compare_function()
2065 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in compare_function()
2071 } else if (Z_TYPE_P(op1)==IS_OBJECT) { in compare_function()
2104 ZEND_API int ZEND_FASTCALL zend_is_identical(zval *op1, zval *op2) /* {{{ */ in zend_is_identical() argument
2106 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in zend_is_identical()
2109 switch (Z_TYPE_P(op1)) { in zend_is_identical()
2115 return (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in zend_is_identical()
2117 return (Z_RES_P(op1) == Z_RES_P(op2)); in zend_is_identical()
2119 return (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in zend_is_identical()
2121 return (Z_STR_P(op1) == Z_STR_P(op2) || in zend_is_identical()
2122 (Z_STRLEN_P(op1) == Z_STRLEN_P(op2) && in zend_is_identical()
2123 memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)) == 0)); in zend_is_identical()
2125 return (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in zend_is_identical()
2126 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in zend_is_identical()
2128 return (Z_OBJ_P(op1) == Z_OBJ_P(op2) && Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)); in zend_is_identical()
2135 ZEND_API int ZEND_FASTCALL is_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_identical_function() argument
2137 ZVAL_BOOL(result, zend_is_identical(op1, op2)); in is_identical_function()
2142 ZEND_API int ZEND_FASTCALL is_not_identical_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_identical_function() argument
2144 ZVAL_BOOL(result, !zend_is_identical(op1, op2)); in is_not_identical_function()
2149 ZEND_API int ZEND_FASTCALL is_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_equal_function() argument
2151 if (compare_function(result, op1, op2) == FAILURE) { in is_equal_function()
2159 ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_not_equal_function() argument
2161 if (compare_function(result, op1, op2) == FAILURE) { in is_not_equal_function()
2169 ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */ in is_smaller_function() argument
2171 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_function()
2179 ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ … in is_smaller_or_equal_function() argument
2181 if (compare_function(result, op1, op2) == FAILURE) { in is_smaller_or_equal_function()
2349 ZEND_API int ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ in increment_function() argument
2352 switch (Z_TYPE_P(op1)) { in increment_function()
2354 fast_long_increment_function(op1); in increment_function()
2357 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2360 ZVAL_LONG(op1, 1); in increment_function()
2366 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in increment_function()
2368 zend_string_release(Z_STR_P(op1)); in increment_function()
2372 ZVAL_DOUBLE(op1, d+1); in increment_function()
2374 ZVAL_LONG(op1, lval+1); in increment_function()
2378 zend_string_release(Z_STR_P(op1)); in increment_function()
2379 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2383 increment_string(op1); in increment_function()
2389 if (Z_OBJ_HANDLER_P(op1, get) in increment_function()
2390 && Z_OBJ_HANDLER_P(op1, set)) { in increment_function()
2395 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in increment_function()
2398 Z_OBJ_HANDLER_P(op1, set)(op1, val); in increment_function() local
2400 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2405 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2); in increment_function()
2412 op1 = Z_REFVAL_P(op1); in increment_function()
2421 ZEND_API int ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2427 switch (Z_TYPE_P(op1)) { in decrement_function()
2429 fast_long_decrement_function(op1); in decrement_function()
2432 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2435 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2436 zend_string_release(Z_STR_P(op1)); in decrement_function()
2437 ZVAL_LONG(op1, -1); in decrement_function()
2440 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in decrement_function()
2442 zend_string_release(Z_STR_P(op1)); in decrement_function()
2445 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2447 ZVAL_LONG(op1, lval-1); in decrement_function()
2451 zend_string_release(Z_STR_P(op1)); in decrement_function()
2452 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2457 if (Z_OBJ_HANDLER_P(op1, get) in decrement_function()
2458 && Z_OBJ_HANDLER_P(op1, set)) { in decrement_function()
2463 val = Z_OBJ_HANDLER_P(op1, get)(op1, &rv); in decrement_function()
2466 Z_OBJ_HANDLER_P(op1, set)(op1, val); in decrement_function() local
2468 } else if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2473 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2); in decrement_function()
2480 op1 = Z_REFVAL_P(op1); in decrement_function()