PHP funkce similar_text()
Dostupnost ve verzích: PHP 4.0
Calculate the similarity between two strings
Parametry
| Parametr | Datový typ | Výchozí hodnota | Poznámka |
|---|---|---|---|
$first |
string |
není | The first string. |
$second |
string |
není | The second string. |
$percent |
float |
null | By passing a reference as third argument, similar_text will calculate the similarity in percent for you. |
Návratové hodnoty
int
the number of matching chars in both strings.