Spoofchecker
class Spoofchecker (View source)
Constants
| SINGLE_SCRIPT_CONFUSABLE |
|
| MIXED_SCRIPT_CONFUSABLE |
|
| WHOLE_SCRIPT_CONFUSABLE |
|
| ANY_CASE |
|
| SINGLE_SCRIPT |
|
| INVISIBLE |
|
| CHAR_LIMIT |
|
| ASCII |
|
| HIGHLY_RESTRICTIVE |
|
| MODERATELY_RESTRICTIVE |
|
| MINIMALLY_RESTRICTIVE |
|
| UNRESTRICTIVE |
|
| SINGLE_SCRIPT_RESTRICTIVE |
|
| MIXED_NUMBERS |
|
| HIDDEN_OVERLAY |
|
|
IGNORE_SPACE
Since: 8.4
|
|
|
CASE_INSENSITIVE
Since: 8.4
|
|
|
ADD_CASE_MAPPINGS
Since: 8.4
|
|
|
SIMPLE_CASE_INSENSITIVE
Since: 8.4
|
|
Methods
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Constructor
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any suspicious characters
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any confusable characters
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Locales to use when running checks
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Set the checks to run
No description
No description
Details
__construct()
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Constructor
bool
isSuspicious(string $string, string $errorCode = null)
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any suspicious characters
bool
areConfusable(string $string1, string $string2, int $errorCode = null)
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Checks if a given text contains any confusable characters
void
setAllowedLocales(string $locales)
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Locales to use when running checks
void
setChecks(int $checks)
(PHP >= 5.4.0, PECL intl >= 2.0.0)
Set the checks to run
void
setRestrictionLevel(int $level)
No description
void
setAllowedChars(string $pattern, int $patternOptions = 0)
No description