Lines Matching refs:string2
22 static zend_long reference_levdist(const zend_string *string1, const zend_string *string2, zend_lon… in reference_levdist() argument
29 return ZSTR_LEN(string2) * cost_ins; in reference_levdist()
31 if (ZSTR_LEN(string2) == 0) { in reference_levdist()
35 p1 = safe_emalloc((ZSTR_LEN(string2) + 1), sizeof(zend_long), 0); in reference_levdist()
36 p2 = safe_emalloc((ZSTR_LEN(string2) + 1), sizeof(zend_long), 0); in reference_levdist()
38 for (i2 = 0; i2 <= ZSTR_LEN(string2); i2++) { in reference_levdist()
44 for (i2 = 0; i2 < ZSTR_LEN(string2); i2++) { in reference_levdist()
45 c0 = p1[i2] + ((ZSTR_VAL(string1)[i1] == ZSTR_VAL(string2)[i2]) ? 0 : cost_rep); in reference_levdist()
60 c0 = p1[ZSTR_LEN(string2)]; in reference_levdist()
72 zend_string *string1, *string2; in PHP_FUNCTION() local
77 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|lll", &string1, &string2, &cost_ins, &cost_rep, &co… in PHP_FUNCTION()
82 RETURN_LONG(reference_levdist(string1, string2, cost_ins, cost_rep, cost_del)); in PHP_FUNCTION()