首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Spoofchecker::areConfusable

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

Spoofchecker::areConfusable — Checks if given strings can be confused

Description

代码语言:javascript
复制
public bool Spoofchecker::areConfusable ( string $str1 , string $str2 [, string &$error ] )

Checks whether two given strings can easily be mistaken.

Parameters

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.

Return Values

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

Examples

Example #1 Spoofchecker::areConfusable() example

代码语言:javascript
复制
<?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

← Spoofchecker

Spoofchecker::__construct →

代码语言:txt
复制
 © 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券