UK[ˈsɪmələ(r)] US[ˈsɪməlɚ]

adj. Similar; similar; same; similar

n. Analogue; similar person; similar thing

Plural: similars Comparative: more similar Superlative: most similar

php similar_text() function syntax

Function:Calculate the similarity of two strings and return the number of matching characters

Syntax:similar_text(string1,string2,percent)

Parameters:

##Parameters Description string1 Required. Specifies the first string to compare. string2 Required. Specifies the second string to be compared. percent Optional. Specifies the variable name used to store percent similarity.

Note: Thefunction can also calculate the percentage similarity of two strings.

php similar_text() function example


Run instance»

Click the "Run instance" button to view the online instance

Output:

6

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

1