3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$DXPcmd = array(0x55,0x82,0x10,0x31,0x00,0x51,0x96); $DXPcmd = array(0x55,0x82,0x10,0x31,0x00,0x51); $DXPcmd = "558210310051"; $SUM=0; for ($i=0; $i < strlen($DXPcmd)-1; $i+=2){ $SUM += hexdec($DXPcmd[$i].$DXPcmd[$i+1]); } $NOTSUM = ~$SUM; echo dechex($NOTSUM); $CHKSUM = $NOTSUM & "11"; echo dechex($CHKSUM); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
Branch analysis from position: 5
filename:       /in/ADi5C
function name:  (null)
number of ops:  31
compiled vars:  !0 = $DXPcmd, !1 = $SUM, !2 = $i, !3 = $NOTSUM, !4 = $CHKSUM
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !0, '558210310051'
    7     2        ASSIGN                                                   !1, 0
    8     3        ASSIGN                                                   !2, 0
          4      > JMP                                                      ->14
    9     5    >   INIT_FCALL                                               'hexdec'
          6        FETCH_DIM_R                                      ~9      !0, !2
          7        ADD                                              ~10     !2, 1
          8        FETCH_DIM_R                                      ~11     !0, ~10
          9        CONCAT                                           ~12     ~9, ~11
         10        SEND_VAL                                                 ~12
         11        DO_ICALL                                         $13     
         12        ASSIGN_OP                                     1          !1, $13
    8    13        ASSIGN_OP                                     1          !2, 2
         14    >   STRLEN                                           ~16     !0
         15        SUB                                              ~17     ~16, 1
         16        IS_SMALLER                                               !2, ~17
         17      > JMPNZ                                                    ~18, ->5
   11    18    >   BW_NOT                                           ~19     !1
         19        ASSIGN                                                   !3, ~19
   12    20        INIT_FCALL                                               'dechex'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $21     
         23        ECHO                                                     $21
   13    24        BW_AND                                           ~22     !3, '11'
         25        ASSIGN                                                   !4, ~22
   14    26        INIT_FCALL                                               'dechex'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $24     
         29        ECHO                                                     $24
   16    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.34 ms | 1396 KiB | 17 Q