1--TEST--
2spoofchecker with restriction level
3--SKIPIF--
4<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
5<?php
6	$r = new ReflectionClass("SpoofChecker");
7	if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) {
8		die("skip Incompatible ICU version");
9	}
10?>
11--FILE--
12<?php
13
14$x = new Spoofchecker();
15$x->setRestrictionLevel(Spoofchecker::HIGHLY_RESTRICTIVE);
16
17$mixed = "\u{91CE}\u{7403}\u{30FC}";
18var_dump($x->isSuspicious($mixed));
19
20$x->setRestrictionLevel(Spoofchecker::SINGLE_SCRIPT_RESTRICTIVE);
21
22$mixed = "\u{91CE}\u{7403}\u{30FC} abc";
23var_dump($x->isSuspicious($mixed));
24?>
25--EXPECT--
26bool(false)
27bool(true)
28