3v4l.org

run code in 300+ PHP versions simultaneously
<?php //加上UTF-16 BOM的base64解码(客户端是根据FFFE的Unicode base64的) function get_utf8_from_base64_utf16($str) { $utf16 = chr(hexdec('FF')) . chr(hexdec('FE')) . base64_decode($str); return iconv('UTF-8-MAC', 'UTF-8', $utf16); } $a= '4pzni6CvdGqHvP7PTpjzLSguxvawG64aWlhY+ODks4eI2PyRYCfzAXU+MR+fJSAaEOqyKaXt02IaMQ3aoRBMnJS/5oEOuc8Pf+iz+Wf5joY1gwuWi2MF2rV8L7ObT6FnfgKMLproczs=_33'; echo(get_utf8_from_base64_utf16($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5v8lb
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, '4pzni6CvdGqHvP7PTpjzLSguxvawG64aWlhY%2BODks4eI2PyRYCfzAXU%2BMR%2BfJSAaEOqyKaXt02IaMQ3aoRBMnJS%2F5oEOuc8Pf%2Biz%2BWf5joY1gwuWi2MF2rV8L7ObT6FnfgKMLproczs%3D_33'
   11     1        INIT_FCALL                                               'get_utf8_from_base64_utf16'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function get_utf8_from_base64_utf16:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5v8lb
function name:  get_utf8_from_base64_utf16
number of ops:  26
compiled vars:  !0 = $str, !1 = $utf16
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'chr'
          2        INIT_FCALL                                               'hexdec'
          3        SEND_VAL                                                 'FF'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        INIT_FCALL                                               'chr'
          8        INIT_FCALL                                               'hexdec'
          9        SEND_VAL                                                 'FE'
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        CONCAT                                           ~6      $3, $5
         14        INIT_FCALL                                               'base64_decode'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        CONCAT                                           ~8      ~6, $7
         18        ASSIGN                                                   !1, ~8
    8    19        INIT_FCALL_BY_NAME                                       'iconv'
         20        SEND_VAL_EX                                              'UTF-8-MAC'
         21        SEND_VAL_EX                                              'UTF-8'
         22        SEND_VAR_EX                                              !1
         23        DO_FCALL                                      0  $10     
         24      > RETURN                                                   $10
    9    25*     > RETURN                                                   null

End of function get_utf8_from_base64_utf16

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.05 ms | 1390 KiB | 20 Q