1--TEST--
2spoofchecker with settings changed
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if(!class_exists("Spoofchecker")) print 'skip'; ?>
7<?php if (version_compare(INTL_ICU_VERSION, '55.1') >=  0) die('skip for ICU < 55.1'); ?>
8--FILE--
9<?php
10
11$korean = "\xED\x95\x9C" . "\xEA\xB5\xAD" . "\xEB\xA7\x90";
12
13$x = new Spoofchecker();
14echo "Check with default settings\n";
15var_dump($x->areConfusable("HELLO", "H\xD0\x95LLO"));
16var_dump($x->areConfusable("hello", "h\xD0\xB5llo"));
17
18echo "Change confusable settings\n";
19$x->setChecks(Spoofchecker::MIXED_SCRIPT_CONFUSABLE |
20  Spoofchecker::WHOLE_SCRIPT_CONFUSABLE |
21  Spoofchecker::SINGLE_SCRIPT_CONFUSABLE);
22var_dump($x->areConfusable("HELLO", "H\xD0\x95LLO"));
23var_dump($x->areConfusable("hello", "h\xD0\xB5llo"));
24?>
25--EXPECT--
26Check with default settings
27bool(true)
28bool(true)
29Change confusable settings
30bool(false)
31bool(true)
32