Spoofchecker::areConfusable

(PHP 5 >= 5.4.0, PHP 7, PECL intl >= 2.0.0)

Spoofchecker::areConfusableChecks if given strings can be confused

说明

public Spoofchecker::areConfusable ( string $str1 , string $str2 [, string &$error ] ) : bool

Checks whether two given strings can easily be mistaken.

参数

str1

First string to check.

str2

Second string to check.

error

This variable is set by-reference to string containing an error, if there were any.

返回值

Returns TRUE if two given strings can be confused, FALSE otherwise.

范例

Example #1 Spoofchecker::areConfusable() example

<?php
$checker 
= new Spoofchecker();

$checker->areConfusable('google.com''goog1e.com'); // true
// Lower l can be confused with digit one

$checker->areConfusable('google.com''g00g1e.com'); // false
// Zero (0) cannot be easily confused with "o" letter

相关文章
php directoryiterator determine if current directoryiterator item can be readphp directoryiterator determine if current directoryiterator item can be written tophp priorityqueue returns a representation that can be converted to jsonphp stack returns a representation that can be converted to jsonphp mcve 函数 returns array of strings which represents the keys that can be used for response parameters on this transactionphp ncurses 函数 checks if terminal color definitions can be changedphp win32service 函数 registers the script with the scm so that it can act as the service with the given namephp mongocommandcursor checks if the cursor is reading a valid resultphp mongocursor checks if the cursor is reading a valid resultphp mongodb bson maxkey returns a representation that can be converted to jsonphp mongodb bson utcdatetime returns a representation that can be converted to jsonphp mongodb driver cursor checks if the cursor may have additional resultsphp mongodb driver server checks if this server is an arbiter member of a replica setphp mysql xdevapi collectionfind skip given number of elements to be returnedphp phar returns true if the phar archive can be modifiedphp phardata returns true if the tar/zip archive can be modifiedphp recursiveiterator returns if an iterator can be created for the current entryphp spoofchecker checks if given strings can be confusedphp spoofchecker checks if a given text contains any suspicious charactersphp zookeeper checks if the current zookeeper connection state can be recovered
关注编程学问公众号