3v4l.org

run code in 300+ PHP versions simultaneously
<?php function insecureMd5Kdf($message, $raw = false) { $bytes = md5($message, true); $output = ''; for ($i = 0; $i < 16; ++$i) { $int = ord($bytes[$i]) & 127; $output .= pack('C', $int); } if (!$raw) { return bin2hex($output); } return $output; } var_dump(insecureMd5Kdf('apple'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q4SLt
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'insecuremd5kdf'
          2        SEND_VAL                                                 'apple'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function insecuremd5kdf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 10
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 10
Branch analysis from position: 24
Branch analysis from position: 10
filename:       /in/q4SLt
function name:  insecureMd5Kdf
number of ops:  32
compiled vars:  !0 = $message, !1 = $raw, !2 = $bytes, !3 = $output, !4 = $i, !5 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    6     2        INIT_FCALL                                               'md5'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        ASSIGN                                                   !3, ''
    8     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->22
    9    10    >   INIT_FCALL                                               'ord'
         11        FETCH_DIM_R                                      ~10     !2, !4
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                         $11     
         14        BW_AND                                           ~12     $11, 127
         15        ASSIGN                                                   !5, ~12
   10    16        INIT_FCALL                                               'pack'
         17        SEND_VAL                                                 'C'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $14     
         20        ASSIGN_OP                                     8          !3, $14
    8    21        PRE_INC                                                  !4
         22    >   IS_SMALLER                                               !4, 16
         23      > JMPNZ                                                    ~17, ->10
   12    24    >   BOOL_NOT                                         ~18     !1
         25      > JMPZ                                                     ~18, ->30
   13    26    >   INIT_FCALL                                               'bin2hex'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $19     
         29      > RETURN                                                   $19
   15    30    > > RETURN                                                   !3
   16    31*     > RETURN                                                   null

End of function insecuremd5kdf

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
130.87 ms | 1009 KiB | 19 Q