Lines Matching refs:op1
810 ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in add_function() argument
816 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in add_function()
818 long lval = Z_LVAL_P(op1) + Z_LVAL_P(op2); in add_function()
821 if ((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK) in add_function()
822 && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { in add_function()
824 ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2)); in add_function()
832 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2)); in add_function()
836 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2))); in add_function()
840 ZVAL_DOUBLE(result, Z_DVAL_P(op1) + Z_DVAL_P(op2)); in add_function()
846 if ((result == op1) && (result == op2)) { in add_function()
850 if (result != op1) { in add_function()
851 *result = *op1; in add_function()
862 zendi_convert_scalar_to_number(op1, op1_copy, result); in add_function()
874 ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in sub_function() argument
880 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in sub_function()
882 long lval = Z_LVAL_P(op1) - Z_LVAL_P(op2); in sub_function()
885 if ((Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK) in sub_function()
886 && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (lval & LONG_SIGN_MASK)) { in sub_function()
888 ZVAL_DOUBLE(result, (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2)); in sub_function()
896 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2)); in sub_function()
900 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2))); in sub_function()
904 ZVAL_DOUBLE(result, Z_DVAL_P(op1) - Z_DVAL_P(op2)); in sub_function()
911 zendi_convert_scalar_to_number(op1, op1_copy, result); in sub_function()
923 ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in mul_function() argument
929 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in mul_function()
933 …ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1),Z_LVAL_P(op2), Z_LVAL_P(result),Z_DVAL_P(result),overflow); in mul_function()
939 ZVAL_DOUBLE(result, ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2)); in mul_function()
943 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2))); in mul_function()
947 ZVAL_DOUBLE(result, Z_DVAL_P(op1) * Z_DVAL_P(op2)); in mul_function()
954 zendi_convert_scalar_to_number(op1, op1_copy, result); in mul_function()
966 ZEND_API int pow_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in pow_function() argument
972 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in pow_function()
975 long l1 = 1, l2 = Z_LVAL_P(op1), i = Z_LVAL_P(op2); in pow_function()
1008 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1013 ZVAL_DOUBLE(result, pow((double)Z_LVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1017 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), (double)Z_LVAL_P(op2))); in pow_function()
1021 ZVAL_DOUBLE(result, pow(Z_DVAL_P(op1), Z_DVAL_P(op2))); in pow_function()
1028 if (Z_TYPE_P(op1) == IS_ARRAY) { in pow_function()
1032 zendi_convert_scalar_to_number(op1, op1_copy, result); in pow_function()
1050 ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in div_function() argument
1056 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in div_function()
1062 } else if (Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == LONG_MIN) { in div_function()
1067 if (Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0) { /* integer */ in div_function()
1068 ZVAL_LONG(result, Z_LVAL_P(op1) / Z_LVAL_P(op2)); in div_function()
1070 ZVAL_DOUBLE(result, ((double) Z_LVAL_P(op1)) / Z_LVAL_P(op2)); in div_function()
1080 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / (double)Z_LVAL_P(op2)); in div_function()
1089 ZVAL_DOUBLE(result, (double)Z_LVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1098 ZVAL_DOUBLE(result, Z_DVAL_P(op1) / Z_DVAL_P(op2)); in div_function()
1105 zendi_convert_scalar_to_number(op1, op1_copy, result); in div_function()
1117 ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in mod_function() argument
1122 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in mod_function()
1125 zendi_convert_to_long(op1, op1_copy, result); in mod_function()
1126 op1_lval = Z_LVAL_P(op1); in mod_function()
1129 op1_lval = Z_LVAL_P(op1); in mod_function()
1149 ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in boolean_xor_function() argument
1154 if (Z_TYPE_P(op1) != IS_BOOL || Z_TYPE_P(op2) != IS_BOOL) { in boolean_xor_function()
1157 zendi_convert_to_boolean(op1, op1_copy, result); in boolean_xor_function()
1158 op1_lval = Z_LVAL_P(op1); in boolean_xor_function()
1161 op1_lval = Z_LVAL_P(op1); in boolean_xor_function()
1169 ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC) /* {{{ */ in boolean_not_function()
1173 if (Z_TYPE_P(op1) != IS_BOOL) { in boolean_not_function()
1176 zendi_convert_to_boolean(op1, op1_copy, result); in boolean_not_function()
1179 ZVAL_BOOL(result, !Z_LVAL_P(op1)); in boolean_not_function()
1184 ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC) /* {{{ */ in bitwise_not_function()
1187 switch (Z_TYPE_P(op1)) { in bitwise_not_function()
1189 ZVAL_LONG(result, ~Z_LVAL_P(op1)); in bitwise_not_function()
1192 ZVAL_LONG(result, ~zend_dval_to_lval(Z_DVAL_P(op1))); in bitwise_not_function()
1196 zval op1_copy = *op1; in bitwise_not_function()
1215 ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in bitwise_or_function() argument
1220 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_or_function()
1225 if (Z_STRLEN_P(op1) >= Z_STRLEN_P(op2)) { in bitwise_or_function()
1226 longer = op1; in bitwise_or_function()
1230 shorter = op1; in bitwise_or_function()
1239 if (result==op1) { in bitwise_or_function()
1247 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in bitwise_or_function()
1250 zendi_convert_to_long(op1, op1_copy, result); in bitwise_or_function()
1251 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1254 op1_lval = Z_LVAL_P(op1); in bitwise_or_function()
1262 ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in bitwise_and_function() argument
1267 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_and_function()
1272 if (Z_STRLEN_P(op1) >= Z_STRLEN_P(op2)) { in bitwise_and_function()
1273 longer = op1; in bitwise_and_function()
1277 shorter = op1; in bitwise_and_function()
1286 if (result==op1) { in bitwise_and_function()
1294 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in bitwise_and_function()
1297 zendi_convert_to_long(op1, op1_copy, result); in bitwise_and_function()
1298 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1301 op1_lval = Z_LVAL_P(op1); in bitwise_and_function()
1309 ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in bitwise_xor_function() argument
1314 if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) { in bitwise_xor_function()
1319 if (Z_STRLEN_P(op1) >= Z_STRLEN_P(op2)) { in bitwise_xor_function()
1320 longer = op1; in bitwise_xor_function()
1324 shorter = op1; in bitwise_xor_function()
1333 if (result==op1) { in bitwise_xor_function()
1341 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in bitwise_xor_function()
1344 zendi_convert_to_long(op1, op1_copy, result); in bitwise_xor_function()
1345 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1348 op1_lval = Z_LVAL_P(op1); in bitwise_xor_function()
1356 ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in shift_left_function() argument
1361 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in shift_left_function()
1364 zendi_convert_to_long(op1, op1_copy, result); in shift_left_function()
1365 op1_lval = Z_LVAL_P(op1); in shift_left_function()
1368 op1_lval = Z_LVAL_P(op1); in shift_left_function()
1376 ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in shift_right_function() argument
1381 if (Z_TYPE_P(op1) != IS_LONG || Z_TYPE_P(op2) != IS_LONG) { in shift_right_function()
1384 zendi_convert_to_long(op1, op1_copy, result); in shift_right_function()
1385 op1_lval = Z_LVAL_P(op1); in shift_right_function()
1388 op1_lval = Z_LVAL_P(op1); in shift_right_function()
1397 ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */ in add_char_to_string() argument
1399 int length = Z_STRLEN_P(op1) + 1; in add_char_to_string()
1406 buf = str_erealloc(Z_STRVAL_P(op1), length + 1); in add_char_to_string()
1416 ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */ in add_string_to_string() argument
1418 int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2); in add_string_to_string()
1425 buf = str_erealloc(Z_STRVAL_P(op1), length + 1); in add_string_to_string()
1427 memcpy(buf + Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in add_string_to_string()
1434 ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in concat_function() argument
1439 if (Z_TYPE_P(op1) != IS_STRING || Z_TYPE_P(op2) != IS_STRING) { in concat_function()
1442 if (Z_TYPE_P(op1) != IS_STRING) { in concat_function()
1443 zend_make_printable_zval(op1, &op1_copy, &use_copy1); in concat_function()
1454 if (result == op1) { in concat_function()
1455 zval_dtor(op1); in concat_function()
1457 op1 = &op1_copy; in concat_function()
1462 …if (result==op1 && !IS_INTERNED(Z_STRVAL_P(op1))) { /* special case, perform operations on result … in concat_function()
1463 uint res_len = Z_STRLEN_P(op1) + Z_STRLEN_P(op2); in concat_function()
1465 if (Z_STRLEN_P(result) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) { in concat_function()
1477 int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2); in concat_function()
1480 if (Z_STRLEN_P(op1) < 0 || Z_STRLEN_P(op2) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) { in concat_function()
1485 memcpy(buf, Z_STRVAL_P(op1), Z_STRLEN_P(op1)); in concat_function()
1486 memcpy(buf + Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2)); in concat_function()
1491 zval_dtor(op1); in concat_function()
1500 ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensit… in string_compare_function_ex() argument
1505 if (Z_TYPE_P(op1) != IS_STRING) { in string_compare_function_ex()
1506 zend_make_printable_zval(op1, &op1_copy, &use_copy1); in string_compare_function_ex()
1513 op1 = &op1_copy; in string_compare_function_ex()
1520 ZVAL_LONG(result, zend_binary_zval_strcasecmp(op1, op2)); in string_compare_function_ex()
1522 ZVAL_LONG(result, zend_binary_zval_strcmp(op1, op2)); in string_compare_function_ex()
1526 zval_dtor(op1); in string_compare_function_ex()
1535 ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in string_compare_function() argument
1537 return string_compare_function_ex(result, op1, op2, 0 TSRMLS_CC); in string_compare_function()
1541 ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in string_case_compare_function() argument
1543 return string_compare_function_ex(result, op1, op2, 1 TSRMLS_CC); in string_case_compare_function()
1548 ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in string_locale_compare_function() argument
1553 if (Z_TYPE_P(op1) != IS_STRING) { in string_locale_compare_function()
1554 zend_make_printable_zval(op1, &op1_copy, &use_copy1); in string_locale_compare_function()
1561 op1 = &op1_copy; in string_locale_compare_function()
1567 ZVAL_LONG(result, strcoll(Z_STRVAL_P(op1), Z_STRVAL_P(op2))); in string_locale_compare_function()
1570 zval_dtor(op1); in string_locale_compare_function()
1580 ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in numeric_compare_function() argument
1584 op1_copy = *op1; in numeric_compare_function()
1611 ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in compare_function() argument
1619 switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { in compare_function()
1621 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()
1625 Z_DVAL_P(result) = Z_DVAL_P(op1) - (double)Z_LVAL_P(op2); in compare_function()
1630 Z_DVAL_P(result) = (double)Z_LVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1635 if (Z_DVAL_P(op1) == Z_DVAL_P(op2)) { in compare_function()
1638 Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2); in compare_function()
1644 zend_compare_arrays(result, op1, op2 TSRMLS_CC); in compare_function()
1656 ZVAL_LONG(result, Z_LVAL_P(op1) ? 1 : 0); in compare_function()
1660 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_LVAL_P(op1) - Z_LVAL_P(op2))); in compare_function()
1664 zendi_smart_strcmp(result, op1, op2); in compare_function()
1672 ZVAL_LONG(result, zend_binary_strcmp(Z_STRVAL_P(op1), Z_STRLEN_P(op1), "", 0)); in compare_function()
1684 if (Z_TYPE_P(op1) == IS_OBJECT && Z_OBJ_HANDLER_P(op1, compare)) { in compare_function()
1685 return Z_OBJ_HANDLER_P(op1, compare)(result, op1, op2 TSRMLS_CC); in compare_function()
1687 return Z_OBJ_HANDLER_P(op2, compare)(result, op1, op2 TSRMLS_CC); in compare_function()
1690 if (Z_TYPE_P(op1) == IS_OBJECT && Z_TYPE_P(op2) == IS_OBJECT) { in compare_function()
1691 if (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) { in compare_function()
1696 if (Z_OBJ_HANDLER_P(op1, compare_objects) == Z_OBJ_HANDLER_P(op2, compare_objects)) { in compare_function()
1697 ZVAL_LONG(result, Z_OBJ_HANDLER_P(op1, compare_objects)(op1, op2 TSRMLS_CC)); in compare_function()
1701 if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
1702 if (Z_OBJ_HT_P(op1)->get) { in compare_function()
1703 op_free = Z_OBJ_HT_P(op1)->get(op1 TSRMLS_CC); in compare_function()
1707 } else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) { in compare_function()
1709 if (Z_OBJ_HT_P(op1)->cast_object(op1, op_free, Z_TYPE_P(op2) TSRMLS_CC) == FAILURE) { in compare_function()
1722 ret = compare_function(result, op1, op_free TSRMLS_CC); in compare_function()
1725 } else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) { in compare_function()
1727 if (Z_OBJ_HT_P(op2)->cast_object(op2, op_free, Z_TYPE_P(op1) TSRMLS_CC) == FAILURE) { in compare_function()
1732 ret = compare_function(result, op1, op_free TSRMLS_CC); in compare_function()
1735 } else if (Z_TYPE_P(op1) == IS_OBJECT) { in compare_function()
1741 if (Z_TYPE_P(op1) == IS_NULL) { in compare_function()
1746 zendi_convert_to_boolean(op1, op1_copy, result); in compare_function()
1747 ZVAL_LONG(result, Z_LVAL_P(op1) ? 1 : 0); in compare_function()
1749 } else if (Z_TYPE_P(op1) == IS_BOOL) { in compare_function()
1751 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_LVAL_P(op1) - Z_LVAL_P(op2))); in compare_function()
1754 zendi_convert_to_boolean(op1, op1_copy, result); in compare_function()
1755 ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_LVAL_P(op1) - Z_LVAL_P(op2))); in compare_function()
1758 zendi_convert_scalar_to_number(op1, op1_copy, result); in compare_function()
1762 } else if (Z_TYPE_P(op1)==IS_ARRAY) { in compare_function()
1768 } else if (Z_TYPE_P(op1)==IS_OBJECT) { in compare_function()
1800 ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_identical_function() argument
1803 if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) { in is_identical_function()
1807 switch (Z_TYPE_P(op1)) { in is_identical_function()
1814 Z_LVAL_P(result) = (Z_LVAL_P(op1) == Z_LVAL_P(op2)); in is_identical_function()
1817 Z_LVAL_P(result) = (Z_DVAL_P(op1) == Z_DVAL_P(op2)); in is_identical_function()
1820 Z_LVAL_P(result) = ((Z_STRLEN_P(op1) == Z_STRLEN_P(op2)) in is_identical_function()
1821 && (!memcmp(Z_STRVAL_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op1)))); in is_identical_function()
1824 Z_LVAL_P(result) = (Z_ARRVAL_P(op1) == Z_ARRVAL_P(op2) || in is_identical_function()
1825 …zend_hash_compare(Z_ARRVAL_P(op1), Z_ARRVAL_P(op2), (compare_func_t) hash_zval_identical_function,… in is_identical_function()
1828 if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2)) { in is_identical_function()
1829 Z_LVAL_P(result) = (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)); in is_identical_function()
1842 ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_not_identical_function() argument
1844 if (is_identical_function(result, op1, op2 TSRMLS_CC) == FAILURE) { in is_not_identical_function()
1852 ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_equal_function() argument
1854 if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) { in is_equal_function()
1862 ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_not_equal_function() argument
1864 if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) { in is_not_equal_function()
1872 ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_smaller_function() argument
1874 if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) { in is_smaller_function()
1882 ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */ in is_smaller_or_equal_function() argument
1884 if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) { in is_smaller_or_equal_function()
2005 ZEND_API int increment_function(zval *op1) /* {{{ */ in increment_function() argument
2007 switch (Z_TYPE_P(op1)) { in increment_function()
2009 if (Z_LVAL_P(op1) == LONG_MAX) { in increment_function()
2011 double d = (double)Z_LVAL_P(op1); in increment_function()
2012 ZVAL_DOUBLE(op1, d+1); in increment_function()
2014 Z_LVAL_P(op1)++; in increment_function()
2018 Z_DVAL_P(op1) = Z_DVAL_P(op1) + 1; in increment_function()
2021 ZVAL_LONG(op1, 1); in increment_function()
2027 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in increment_function()
2029 str_efree(Z_STRVAL_P(op1)); in increment_function()
2033 ZVAL_DOUBLE(op1, d+1); in increment_function()
2035 ZVAL_LONG(op1, lval+1); in increment_function()
2039 str_efree(Z_STRVAL_P(op1)); in increment_function()
2040 ZVAL_DOUBLE(op1, dval+1); in increment_function()
2044 increment_string(op1); in increment_function()
2050 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in increment_function()
2057 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, op2 TSRMLS_CC); in increment_function()
2070 ZEND_API int decrement_function(zval *op1) /* {{{ */ in decrement_function() argument
2075 switch (Z_TYPE_P(op1)) { in decrement_function()
2077 if (Z_LVAL_P(op1) == LONG_MIN) { in decrement_function()
2078 double d = (double)Z_LVAL_P(op1); in decrement_function()
2079 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2081 Z_LVAL_P(op1)--; in decrement_function()
2085 Z_DVAL_P(op1) = Z_DVAL_P(op1) - 1; in decrement_function()
2088 if (Z_STRLEN_P(op1) == 0) { /* consider as 0 */ in decrement_function()
2089 str_efree(Z_STRVAL_P(op1)); in decrement_function()
2090 ZVAL_LONG(op1, -1); in decrement_function()
2093 switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) { in decrement_function()
2095 str_efree(Z_STRVAL_P(op1)); in decrement_function()
2098 ZVAL_DOUBLE(op1, d-1); in decrement_function()
2100 ZVAL_LONG(op1, lval-1); in decrement_function()
2104 str_efree(Z_STRVAL_P(op1)); in decrement_function()
2105 ZVAL_DOUBLE(op1, dval - 1); in decrement_function()
2110 if (Z_OBJ_HANDLER_P(op1, do_operation)) { in decrement_function()
2117 res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, op2 TSRMLS_CC); in decrement_function()