1--TEST--
2spoofchecker suspicious character checker
3--SKIPIF--
4<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
5<?php if (version_compare(INTL_ICU_VERSION, '57.1') < 0) die('skip for ICU >= 58.1'); ?>
6--FILE--
7<?php
8
9echo "paypal with Cyrillic spoof characters\n";
10$x = new Spoofchecker();
11var_dump($x->isSuspicious("http://www.payp\u{0430}l.com"));
12var_dump($x->isSuspicious("\u{041F}aypal.com"));
13
14echo "certain all-uppercase Latin sequences can be spoof of Greek\n";
15$x = new Spoofchecker();
16$x->setAllowedLocales("gr_GR");
17var_dump($x->isSuspicious("NAPKIN PEZ"));
18var_dump($x->isSuspicious("napkin pez"));
19?>
20--EXPECT--
21paypal with Cyrillic spoof characters
22bool(true)
23bool(true)
24certain all-uppercase Latin sequences can be spoof of Greek
25bool(true)
26bool(true)
27