Str::similarity()
Calculates the similarity between two strings with multibyte support
Str::similarity(string $first, string $second, bool $caseInsensitive = false): array{matches: non-negative-int, percent: float}
Parameters
| Name | Type | Default |
|---|---|---|
| $firstrequired | string |
no default value |
| $secondrequired | string |
no default value |
| $caseInsensitive | bool |
false
|
Return type
array{matches: non-negative-int, percent: float}