1--TEST--
2MessageFormatter::format() invalid UTF-8 for arg key or value
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
8	die('skip for ICU 4.8+');
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12
13$fmt = <<<EOD
14{foo}
15EOD;
16
17$mf = new MessageFormatter('en_US', $fmt);
18var_dump($mf->format(array("foo" => 7, "\x80" => "bar")));
19
20var_dump($mf->format(array("foo" => "\x80")));
21--EXPECTF--
22Warning: MessageFormatter::format(): Invalid UTF-8 data in argument key: '�' in %s on line %d
23bool(false)
24
25Warning: MessageFormatter::format(): Invalid UTF-8 data in string argument: '�' in %s on line %d
26bool(false)
27