Annotation of embedaddon/php/ext/mbstring/tests/mb_get_info.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test mb_get_info() function
! 3: --SKIPIF--
! 4: <?php extension_loaded('mbstring') or die('skip'); ?>
! 5: --INI--
! 6: mbstring.encoding_translation=1
! 7: mbstring.language=Korean
! 8: mbstring.internal_encoding=UTF-8
! 9: mbstring.http_input=ISO-8859-1
! 10: mbstring.http_output=ISO-8859-15
! 11: mbstring.http_output_conv_mimetypes=abc
! 12: mbstring.func_overload=2
! 13: mbstring.detect_order=UTF-8,ISO-8859-15,ISO-8859-1,ASCII
! 14: mbstring.substitute_character=123
! 15: mbstring.strict_detection=1
! 16: --FILE--
! 17: <?php
! 18: mb_parse_str("abc=def", $dummy);
! 19: mb_convert_encoding("\xff\xff", "Shift_JIS", "UCS-2BE");
! 20: $result = mb_get_info();
! 21: var_dump($result);
! 22: foreach (array_keys($result) as $key) {
! 23: var_dump($result[$key], mb_get_info($key));
! 24: }
! 25: ?>
! 26: --EXPECT--
! 27: array(15) {
! 28: ["internal_encoding"]=>
! 29: string(5) "UTF-8"
! 30: ["http_input"]=>
! 31: string(10) "ISO-8859-1"
! 32: ["http_output"]=>
! 33: string(11) "ISO-8859-15"
! 34: ["http_output_conv_mimetypes"]=>
! 35: string(3) "abc"
! 36: ["func_overload"]=>
! 37: int(2)
! 38: ["func_overload_list"]=>
! 39: array(12) {
! 40: ["strlen"]=>
! 41: string(9) "mb_strlen"
! 42: ["strpos"]=>
! 43: string(9) "mb_strpos"
! 44: ["strrpos"]=>
! 45: string(10) "mb_strrpos"
! 46: ["stripos"]=>
! 47: string(10) "mb_stripos"
! 48: ["strripos"]=>
! 49: string(11) "mb_strripos"
! 50: ["strstr"]=>
! 51: string(9) "mb_strstr"
! 52: ["strrchr"]=>
! 53: string(10) "mb_strrchr"
! 54: ["stristr"]=>
! 55: string(10) "mb_stristr"
! 56: ["substr"]=>
! 57: string(9) "mb_substr"
! 58: ["strtolower"]=>
! 59: string(13) "mb_strtolower"
! 60: ["strtoupper"]=>
! 61: string(13) "mb_strtoupper"
! 62: ["substr_count"]=>
! 63: string(15) "mb_substr_count"
! 64: }
! 65: ["mail_charset"]=>
! 66: string(11) "ISO-2022-KR"
! 67: ["mail_header_encoding"]=>
! 68: string(6) "BASE64"
! 69: ["mail_body_encoding"]=>
! 70: string(4) "7bit"
! 71: ["illegal_chars"]=>
! 72: int(1)
! 73: ["encoding_translation"]=>
! 74: string(2) "On"
! 75: ["language"]=>
! 76: string(6) "Korean"
! 77: ["detect_order"]=>
! 78: array(4) {
! 79: [0]=>
! 80: string(5) "UTF-8"
! 81: [1]=>
! 82: string(11) "ISO-8859-15"
! 83: [2]=>
! 84: string(10) "ISO-8859-1"
! 85: [3]=>
! 86: string(5) "ASCII"
! 87: }
! 88: ["substitute_character"]=>
! 89: int(123)
! 90: ["strict_detection"]=>
! 91: string(2) "On"
! 92: }
! 93: string(5) "UTF-8"
! 94: string(5) "UTF-8"
! 95: string(10) "ISO-8859-1"
! 96: string(10) "ISO-8859-1"
! 97: string(11) "ISO-8859-15"
! 98: string(11) "ISO-8859-15"
! 99: string(3) "abc"
! 100: string(3) "abc"
! 101: int(2)
! 102: int(2)
! 103: array(12) {
! 104: ["strlen"]=>
! 105: string(9) "mb_strlen"
! 106: ["strpos"]=>
! 107: string(9) "mb_strpos"
! 108: ["strrpos"]=>
! 109: string(10) "mb_strrpos"
! 110: ["stripos"]=>
! 111: string(10) "mb_stripos"
! 112: ["strripos"]=>
! 113: string(11) "mb_strripos"
! 114: ["strstr"]=>
! 115: string(9) "mb_strstr"
! 116: ["strrchr"]=>
! 117: string(10) "mb_strrchr"
! 118: ["stristr"]=>
! 119: string(10) "mb_stristr"
! 120: ["substr"]=>
! 121: string(9) "mb_substr"
! 122: ["strtolower"]=>
! 123: string(13) "mb_strtolower"
! 124: ["strtoupper"]=>
! 125: string(13) "mb_strtoupper"
! 126: ["substr_count"]=>
! 127: string(15) "mb_substr_count"
! 128: }
! 129: array(12) {
! 130: ["strlen"]=>
! 131: string(9) "mb_strlen"
! 132: ["strpos"]=>
! 133: string(9) "mb_strpos"
! 134: ["strrpos"]=>
! 135: string(10) "mb_strrpos"
! 136: ["stripos"]=>
! 137: string(10) "mb_stripos"
! 138: ["strripos"]=>
! 139: string(11) "mb_strripos"
! 140: ["strstr"]=>
! 141: string(9) "mb_strstr"
! 142: ["strrchr"]=>
! 143: string(10) "mb_strrchr"
! 144: ["stristr"]=>
! 145: string(10) "mb_stristr"
! 146: ["substr"]=>
! 147: string(9) "mb_substr"
! 148: ["strtolower"]=>
! 149: string(13) "mb_strtolower"
! 150: ["strtoupper"]=>
! 151: string(13) "mb_strtoupper"
! 152: ["substr_count"]=>
! 153: string(15) "mb_substr_count"
! 154: }
! 155: string(11) "ISO-2022-KR"
! 156: string(11) "ISO-2022-KR"
! 157: string(6) "BASE64"
! 158: string(6) "BASE64"
! 159: string(4) "7bit"
! 160: string(4) "7bit"
! 161: int(1)
! 162: int(1)
! 163: string(2) "On"
! 164: string(2) "On"
! 165: string(6) "Korean"
! 166: string(6) "Korean"
! 167: array(4) {
! 168: [0]=>
! 169: string(5) "UTF-8"
! 170: [1]=>
! 171: string(11) "ISO-8859-15"
! 172: [2]=>
! 173: string(10) "ISO-8859-1"
! 174: [3]=>
! 175: string(5) "ASCII"
! 176: }
! 177: array(4) {
! 178: [0]=>
! 179: string(5) "UTF-8"
! 180: [1]=>
! 181: string(11) "ISO-8859-15"
! 182: [2]=>
! 183: string(10) "ISO-8859-1"
! 184: [3]=>
! 185: string(5) "ASCII"
! 186: }
! 187: int(123)
! 188: int(123)
! 189: string(2) "On"
! 190: string(2) "On"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>