(PHP 5 >= 5.4.0, PHP 7, PHP 8, PECL intl >= 2.0.0)
Spoofchecker::areConfusable — 檢查給定的字串是否容易混淆
檢查兩個給定的字串是否容易被誤認。
string1
要檢查的第一個字串。
字串2 (string2)
第二個要檢查的字串。
錯誤碼 (errorCode)
此變數以傳址方式設定為 整數 (int) 型態,包含錯誤碼(如果有的話)。
範例 #1 Spoofchecker::areConfusable() 範例
<?php
$checker = new Spoofchecker();
$checker->areConfusable('google.com', 'goog1e.com'); // true
// 小寫 l 可能與數字 1 混淆
$checker->areConfusable('google.com', 'g00g1e.com'); // false
// 零 (0) 不容易與字母 "o" 混淆