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