3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hex2asc($str) { $str = join('',explode('\x',$str)); $len = strlen($str); for ($i=0;$i<$len;$i+=2) $data.=chr(hexdec(substr($str,$i,2))); return $data; } echo hex2asc("\x03\x01\x10\x04\xBD\xFD\xBF\x0A");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8M13i
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'hex2asc'
          1        SEND_VAL                                                 '%03%01%10%04%BD%FD%BF%0A'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function hex2asc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 14
Branch analysis from position: 29
Branch analysis from position: 14
filename:       /in/8M13i
function name:  hex2asc
number of ops:  31
compiled vars:  !0 = $str, !1 = $len, !2 = $i, !3 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'join'
          2        SEND_VAL                                                 ''
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%5Cx'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !0, $5
    4    10        STRLEN                                           ~7      !0
         11        ASSIGN                                                   !1, ~7
    5    12        ASSIGN                                                   !2, 0
         13      > JMP                                                      ->27
         14    >   INIT_FCALL                                               'chr'
         15        INIT_FCALL                                               'hexdec'
         16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !2
         19        SEND_VAL                                                 2
         20        DO_ICALL                                         $10     
         21        SEND_VAR                                                 $10
         22        DO_ICALL                                         $11     
         23        SEND_VAR                                                 $11
         24        DO_ICALL                                         $12     
         25        ASSIGN_OP                                     8          !3, $12
         26        ASSIGN_OP                                     1          !2, 2
         27    >   IS_SMALLER                                               !2, !1
         28      > JMPNZ                                                    ~15, ->14
    6    29    > > RETURN                                                   !3
    7    30*     > RETURN                                                   null

End of function hex2asc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.68 ms | 1399 KiB | 24 Q