Spoofchecker::areConfusable

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

Spoofchecker::areConfusable โ€” ๆŒ‡ๅฎšใ•ใ‚ŒใŸๆ–‡ๅญ—ๅˆ—ใŒใ€่ชญใฟๆ‰‹ใ‚’ๆททไนฑใ•ใ›ใ†ใ‚‹ใ‹ใ‚’ใƒใ‚งใƒƒใ‚ฏใ™ใ‚‹

่ชฌๆ˜Ž

public function Spoofchecker::areConfusable(string $string1, string $string2, int &$errorCode = null): bool

ใตใŸใคใฎๆŒ‡ๅฎšใ•ใ‚ŒใŸๆ–‡ๅญ—ๅˆ—ใŒใ€้–“้•ใ„ใ‚„ใ™ใ„ใ‚‚ใฎใ‹ใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใพใ™ใ€‚

ใƒ‘ใƒฉใƒกใƒผใ‚ฟ

string1

ใƒใ‚งใƒƒใ‚ฏใ™ใ‚‹ใฒใจใคใ‚ใฎๆ–‡ๅญ—ๅˆ—ใ€‚

string2

ใƒใ‚งใƒƒใ‚ฏใ™ใ‚‹ใตใŸใคใ‚ใฎๆ–‡ๅญ—ๅˆ—ใ€‚

errorCode

ๆ•ดๆ•ฐใฎใƒชใƒ•ใ‚กใƒฌใƒณใ‚นใ‚’่จญๅฎšใ—ใพใ™ใ€‚ ใ‚จใƒฉใƒผใŒใ‚ใฃใŸๅ ดๅˆใซใฏใ€ ใ‚จใƒฉใƒผใ‚ณใƒผใƒ‰ๅ€คใ‚’ๅซใฟใพใ™ใ€‚

ๆˆปใ‚Šๅ€ค

ใตใŸใคใฎๆŒ‡ๅฎšใ•ใ‚ŒใŸๆ–‡ๅญ—ๅˆ—ใŒใ€้–“้•ใ„ใ‚„ใ™ใ„ใ‚‚ใฎใงใ‚ใ‚Œใฐ true ใ‚’ใ€ ใใ†ใงใชใ„ๅ ดๅˆใฏ false ใ‚’่ฟ”ใ—ใพใ™ใ€‚

ไพ‹

ไพ‹1 Spoofchecker::areConfusable() ใฎไพ‹

<?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
๏ผ‹add a note

User Contributed Notes

There are no user contributed notes for this page.