<?php $url = "http://www.paypаl.com"; $x = new Spoofchecker(); echo "Checking if words are confusable\n"; var_dump($x->areConfusable("hello, world", "goodbye, world")); var_dump($x->areConfusable("hello, world", "hello, world")); var_dump($x->areConfusable("hello, world", "he11o, wor1d"));
<?php $korean = "한" . "국" . "말"; $x = new Spoofchecker(); echo "Check with default settings\n"; var_dump($x->areConfusable("HELLO", "HЕLLO")); var_dump($x->areConfusable("hello", "hеllo")); echo "Change confusable settings\n"; $x->setChecks(Spoofchecker::MIXED_SCRIPT_CONFUSABLE | Spoofchecker::WHOLE_SCRIPT_CONFUSABLE | Spoofchecker::SINGLE_SCRIPT_CONFUSABLE); var_dump($x->areConfusable("HELLO", "HЕLLO")); var_dump($x->areConfusable("hello", "hеllo"));