<?php
$some_string = "Ку ку";
$arra_c = array("UCS-4",
"UCS-4BE",
"UCS-4LE",
"UCS-2",
"UCS-2BE",
"UCS-2LE",
"UTF-32",
"UTF-32BE",
"UTF-32LE",
"UTF-16",
"UTF-16BE",
"UTF-16LE",
"UTF-7",
"UTF7-IMAP",
"UTF-8",
"ASCII",
"EUC-JP",
"SJIS",
"eucJP-win",
"SJIS-win",
"ISO-2022-JP",
"ISO-2022-JP-MS",
"CP932",
"CP51932",
"SJIS-mac",
"SJIS-Mobile#DOCOMO",
"SJIS-Mobile#KDDI",
"SJIS-Mobile#SOFTBANK",
"UTF-8-Mobile#DOCOMO",
"UTF-8-Mobile#KDDI-A",
"UTF-8-Mobile#KDDI-B",
"UTF-8-Mobile#SOFTBANK",
"ISO-2022-JP-MOBILE#KDDI",
"JIS",
"JIS-ms",
"CP50220",
"CP50220raw",
"CP50221",
"CP50222",
"ISO-8859-1",
"ISO-8859-2",
"ISO-8859-3",
"ISO-8859-4",
"ISO-8859-5",
"ISO-8859-6",
"ISO-8859-7",
"ISO-8859-8",
"ISO-8859-9",
"ISO-8859-10",
"ISO-8859-13",
"ISO-8859-14",
"ISO-8859-15",
"byte2be",
"byte2le",
"byte4be",
"byte4le",
"BASE64",
"HTML-ENTITIES",
"7bit",
"8bit",
"EUC-CN",
"CP936",
"GB18030",
"HZ",
"EUC-TW",
"CP950",
"BIG-5",
"EUC-KR",
"UHC",// (CP949)
"ISO-2022-KR",
"Windows-1251",// (CP1251)
"Windows-1252",// (CP1252)
"CP866",// (IBM866)
"KOI8-R");
foreach($arra_c as $k => $v){
var_dump(mb_convert_encoding($some_string,$v,"UTF-8" ). "-" . $v ." # ". strlen(json_encode(array('message' => mb_convert_encoding($some_string,$v,"UTF-8" )))));
}
//var_dump(mb_detect_encoding($some_string));
//var_dump(strlen(json_encode(array('message' => $some_string))));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 28
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 28
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename: /in/iEv4F
function name: (null)
number of ops: 30
compiled vars: !0 = $some_string, !1 = $arra_c, !2 = $v, !3 = $k
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN !0, '%D0%9A%D1%83+%D0%BA%D1%83'
5 1 ASSIGN !1, <array>
80 2 > FE_RESET_R $6 !1, ->28
3 > > FE_FETCH_R ~7 $6, !2, ->28
4 > ASSIGN !3, ~7
82 5 INIT_FCALL 'var_dump'
6 INIT_FCALL 'mb_convert_encoding'
7 SEND_VAR !0
8 SEND_VAR !2
9 SEND_VAL 'UTF-8'
10 DO_ICALL $9
11 CONCAT ~10 $9, '-'
12 CONCAT ~11 ~10, !2
13 CONCAT ~12 ~11, '+%23+'
14 INIT_FCALL 'json_encode'
15 INIT_FCALL 'mb_convert_encoding'
16 SEND_VAR !0
17 SEND_VAR !2
18 SEND_VAL 'UTF-8'
19 DO_ICALL $13
20 INIT_ARRAY ~14 $13, 'message'
21 SEND_VAL ~14
22 DO_ICALL $15
23 STRLEN ~16 $15
24 CONCAT ~17 ~12, ~16
25 SEND_VAL ~17
26 DO_ICALL
80 27 > JMP ->3
28 > FE_FREE $6
89 29 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
169.58 ms | 1396 KiB | 19 Q