spoofchecker_002.phpt 527 B

1234567891011121314151617181920
  1. --TEST--
  2. spoofchecker confusable tests
  3. --SKIPIF--
  4. <?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
  5. --FILE--
  6. <?php
  7. $url = "http://www.payp\xD0\xB0l.com";
  8. $x = new Spoofchecker();
  9. echo "Checking if words are confusable\n";
  10. var_dump($x->areConfusable("hello, world", "goodbye, world"));
  11. var_dump($x->areConfusable("hello, world", "hello, world"));
  12. var_dump($x->areConfusable("hello, world", "he11o, wor1d"));
  13. ?>
  14. --EXPECTF--
  15. Checking if words are confusable
  16. bool(false)
  17. bool(true)
  18. bool(true)