3v4l.org

run code in 300+ PHP versions simultaneously
<?php function conv($str): string { $res = ''; $res .= ' SJIS: ' . mb_convert_encoding($str, 'SJIS', 'UTF-8') . "\n"; $res .= 'SJIS-win: ' . mb_convert_encoding($str, 'SJIS-win', 'UTF-8') . "\n"; return $res; } $res = ''; $res = conv('あ'); $res .= conv('~'); $res .= conv('\\'); echo $res;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dt0Pq
function name:  (null)
number of ops:  15
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, ''
   13     1        INIT_FCALL                                               'conv'
          2        SEND_VAL                                                 '%E3%81%82'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   14     5        INIT_FCALL                                               'conv'
          6        SEND_VAL                                                 '%7E'
          7        DO_FCALL                                      0  $4      
          8        ASSIGN_OP                                     8          !0, $4
   15     9        INIT_FCALL                                               'conv'
         10        SEND_VAL                                                 '%5C'
         11        DO_FCALL                                      0  $6      
         12        ASSIGN_OP                                     8          !0, $6
   16    13        ECHO                                                     !0
   17    14      > RETURN                                                   1

Function conv:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dt0Pq
function name:  conv
number of ops:  22
compiled vars:  !0 = $str, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, ''
    6     2        INIT_FCALL                                               'mb_convert_encoding'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'SJIS'
          5        SEND_VAL                                                 'UTF-8'
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      '++++SJIS%3A+', $3
          8        CONCAT                                           ~5      ~4, '%0A'
          9        ASSIGN_OP                                     8          !1, ~5
    7    10        INIT_FCALL                                               'mb_convert_encoding'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 'SJIS-win'
         13        SEND_VAL                                                 'UTF-8'
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      'SJIS-win%3A+', $7
         16        CONCAT                                           ~9      ~8, '%0A'
         17        ASSIGN_OP                                     8          !1, ~9
    9    18        VERIFY_RETURN_TYPE                                       !1
         19      > RETURN                                                   !1
   10    20*       VERIFY_RETURN_TYPE                                       
         21*     > RETURN                                                   null

End of function conv

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.87 ms | 1454 KiB | 17 Q