1--TEST--
2mb_http_input()
3--EXTENSIONS--
4mbstring
5--POST--
6a=���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
7--GET--
8b=���ܸ�0123456789���ܸ쥫�����ʤҤ餬��
9--INI--
10mbstring.encoding_translation=1
11input_encoding=latin1
12--FILE--
13<?php
14
15echo $_POST['a']."\n";
16echo $_GET['b']."\n";
17
18// Get encoding
19var_dump(mb_http_input('P'));
20var_dump(mb_http_input('G'));
21var_dump(mb_http_input('C'));
22var_dump(mb_http_input('S'));
23var_dump(mb_http_input('I'));
24var_dump(mb_http_input('L'));
25try {
26    var_dump(mb_http_input('Q'));
27} catch (ValueError $e) {
28    echo $e->getMessage(), "\n";
29}
30
31?>
32--EXPECT--
33ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
34ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
35string(10) "ISO-8859-1"
36string(10) "ISO-8859-1"
37bool(false)
38bool(false)
39array(1) {
40  [0]=>
41  string(10) "ISO-8859-1"
42}
43string(10) "ISO-8859-1"
44mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
45