1--TEST-- 2mb_http_input() with POST method and multiple candidate encodings 3--EXTENSIONS-- 4mbstring 5--POST-- 6a=日本語&b=ελληνικά 7--INI-- 8mbstring.encoding_translation=1 9input_encoding=UTF-8,SJIS,EUC-JP,ISO-8859-1 10--FILE-- 11<?php 12 13echo $_POST['a']."\n"; 14echo $_POST['b']."\n"; 15 16// Get encoding 17var_dump(mb_http_input('P')); 18var_dump(mb_http_input('G')); 19var_dump(mb_http_input('C')); 20var_dump(mb_http_input('S')); 21var_dump(mb_http_input('I')); 22var_dump(mb_http_input('L')); 23 24?> 25--EXPECT-- 26日本語 27ελληνικά 28string(5) "UTF-8" 29bool(false) 30bool(false) 31bool(false) 32array(4) { 33 [0]=> 34 string(5) "UTF-8" 35 [1]=> 36 string(4) "SJIS" 37 [2]=> 38 string(6) "EUC-JP" 39 [3]=> 40 string(10) "ISO-8859-1" 41} 42string(28) "UTF-8,SJIS,EUC-JP,ISO-8859-1" 43