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 set 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 gmagick checks if the object has more imagesphp mongocursor sets whether this query can be done on a secondary deprecated php mongodb bson decimal128 returns a representation that can be converted to jsonphp mongodb bson symbol returns a representation that can be converted to jsonphp 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 reflectionfunctionabstract checks if the function has a specified return typephp spoofchecker checks if given strings can be confusedphp spoofchecker checks if a given text contains any suspicious charactersphp swoole mmap map a file into memory and return the stream resource which can be used by php stream operations.php swoole server shutdown the master server process this function can be called in worker processes.php tidynode checks if a node is phpphp tidynode checks if a node represents text no markup php zookeeper checks if the current zookeeper connection state can be recovered
关注编程学问公众号