Lines Matching refs:string2
21 static zend_long reference_levdist(const zend_string *string1, const zend_string *string2, zend_lon… in reference_levdist() argument
28 return ZSTR_LEN(string2) * cost_ins; in reference_levdist()
30 if (ZSTR_LEN(string2) == 0) { in reference_levdist()
37 if (ZSTR_LEN(string1) < ZSTR_LEN(string2) && cost_ins == cost_rep && cost_rep == cost_del) { in reference_levdist()
39 string1 = string2; in reference_levdist()
40 string2 = tmp; in reference_levdist()
43 p1 = safe_emalloc((ZSTR_LEN(string2) + 1), sizeof(zend_long), 0); in reference_levdist()
44 p2 = safe_emalloc((ZSTR_LEN(string2) + 1), sizeof(zend_long), 0); in reference_levdist()
46 for (i2 = 0; i2 <= ZSTR_LEN(string2); i2++) { in reference_levdist()
52 for (i2 = 0; i2 < ZSTR_LEN(string2); i2++) { in reference_levdist()
53 c0 = p1[i2] + ((ZSTR_VAL(string1)[i1] == ZSTR_VAL(string2)[i2]) ? 0 : cost_rep); in reference_levdist()
68 c0 = p1[ZSTR_LEN(string2)]; in reference_levdist()
80 zend_string *string1, *string2; in PHP_FUNCTION() local
85 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|lll", &string1, &string2, &cost_ins, &cost_rep, &co… in PHP_FUNCTION()
90 RETURN_LONG(reference_levdist(string1, string2, cost_ins, cost_rep, cost_del)); in PHP_FUNCTION()