3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_substitute_character("none"); $input = 'あaいb'; $bytes_length = 10; $encoding = "ISO-2022-JP"; $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding()); var_dump(bin2hex($converted_str)); $cut_str = mb_strcut($converted_str, 0, $bytes_length, $encoding); var_dump(bin2hex($cut_str)); $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding); var_dump($reconverted_str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Intbd
function name:  (null)
number of ops:  45
compiled vars:  !0 = $input, !1 = $bytes_length, !2 = $encoding, !3 = $converted_str, !4 = $cut_str, !5 = $reconverted_str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'mb_substitute_character'
          1        SEND_VAL                                                 'none'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, '%E3%81%82a%E3%81%84b'
    5     4        ASSIGN                                                   !1, 10
    6     5        ASSIGN                                                   !2, 'ISO-2022-JP'
    7     6        INIT_FCALL                                               'mb_convert_encoding'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !2
          9        INIT_FCALL                                               'mb_internal_encoding'
         10        DO_ICALL                                         $10     
         11        SEND_VAR                                                 $10
         12        DO_ICALL                                         $11     
         13        ASSIGN                                                   !3, $11
    8    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'bin2hex'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $13     
         18        SEND_VAR                                                 $13
         19        DO_ICALL                                                 
    9    20        INIT_FCALL                                               'mb_strcut'
         21        SEND_VAR                                                 !3
         22        SEND_VAL                                                 0
         23        SEND_VAR                                                 !1
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $15     
         26        ASSIGN                                                   !4, $15
   10    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'bin2hex'
         29        SEND_VAR                                                 !4
         30        DO_ICALL                                         $17     
         31        SEND_VAR                                                 $17
         32        DO_ICALL                                                 
   11    33        INIT_FCALL                                               'mb_convert_encoding'
         34        SEND_VAR                                                 !4
         35        INIT_FCALL                                               'mb_internal_encoding'
         36        DO_ICALL                                         $19     
         37        SEND_VAR                                                 $19
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                         $20     
         40        ASSIGN                                                   !5, $20
   12    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !5
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.21 ms | 1008 KiB | 19 Q