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