3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '你好'; $input_encoding = 'GBK'; $str_gb = iconv($input_encoding, 'GBK', true); echo sprintf("gb encoding :%s\n", $str_gb); echo sprintf("gb encoding md5:%s\n", md5($str_gb));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vTopL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $str, !1 = $input_encoding, !2 = $str_gb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%E4%BD%A0%E5%A5%BD'
    3     1        ASSIGN                                                   !1, 'GBK'
    4     2        INIT_FCALL_BY_NAME                                       'iconv'
          3        SEND_VAR_EX                                              !1
          4        SEND_VAL_EX                                              'GBK'
          5        SEND_VAL_EX                                              <true>
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !2, $5
    5     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 'gb+encoding+%3A%25s%0A'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        ECHO                                                     $7
    6    13        INIT_FCALL                                               'sprintf'
         14        SEND_VAL                                                 'gb+encoding+md5%3A%25s%0A'
         15        INIT_FCALL                                               'md5'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                         $9      
         20        ECHO                                                     $9
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.26 ms | 1395 KiB | 17 Q