3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "algjhsdiouahwergoiuawhgiouaehnrgzdfgb23523"; $hash_function = "sha256"; $i = 0; $found = []; while (count($found) < 2) { $pw = base64_encode(str_repeat($i, 5)); $hash = hash_hmac($hash_function, $pw, $key); if ($hash[0] === "\0") { $found[] = $pw; } $i++; } var_dump($i, $found);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 5
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 5
Branch analysis from position: 28
Branch analysis from position: 5
Branch analysis from position: 24
filename:       /in/Ci1rh
function name:  (null)
number of ops:  33
compiled vars:  !0 = $key, !1 = $hash_function, !2 = $i, !3 = $found, !4 = $pw, !5 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'algjhsdiouahwergoiuawhgiouaehnrgzdfgb23523'
    4     1        ASSIGN                                                   !1, 'sha256'
    5     2        ASSIGN                                                   !2, 0
    6     3        ASSIGN                                                   !3, <array>
    8     4      > JMP                                                      ->25
    9     5    >   INIT_FCALL                                               'base64_encode'
          6        INIT_FCALL                                               'str_repeat'
          7        SEND_VAR                                                 !2
          8        SEND_VAL                                                 5
          9        DO_ICALL                                         $10     
         10        SEND_VAR                                                 $10
         11        DO_ICALL                                         $11     
         12        ASSIGN                                                   !4, $11
   10    13        INIT_FCALL                                               'hash_hmac'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !4
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $13     
         18        ASSIGN                                                   !5, $13
   11    19        FETCH_DIM_R                                      ~15     !5, 0
         20        IS_IDENTICAL                                             ~15, '%00'
         21      > JMPZ                                                     ~16, ->24
   12    22    >   ASSIGN_DIM                                               !3
         23        OP_DATA                                                  !4
   14    24    >   PRE_INC                                                  !2
    8    25    >   COUNT                                            ~19     !3
         26        IS_SMALLER                                               ~19, 2
         27      > JMPNZ                                                    ~20, ->5
   17    28    >   INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !2
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.08 ms | 1396 KiB | 21 Q