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, true); 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 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 5
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 5
Branch analysis from position: 29
Branch analysis from position: 5
Branch analysis from position: 25
filename:       /in/BCPlG
function name:  (null)
number of ops:  34
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                                                      ->26
    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        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !5, $13
   11    20        FETCH_DIM_R                                      ~15     !5, 0
         21        IS_IDENTICAL                                             ~15, '%00'
         22      > JMPZ                                                     ~16, ->25
   12    23    >   ASSIGN_DIM                                               !3
         24        OP_DATA                                                  !4
   14    25    >   PRE_INC                                                  !2
    8    26    >   COUNT                                            ~19     !3
         27        IS_SMALLER                                               ~19, 2
         28      > JMPNZ                                                    ~20, ->5
   17    29    >   INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !2
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.68 ms | 1396 KiB | 21 Q