3v4l.org

run code in 300+ PHP versions simultaneously
<?php $passwords = [ 'Password123LOLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabfjhys' => '3e!-uh5Cxkk!6btWU5?R', 'Password123LOLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaruobbk' => '1ed+&$U( n=^K.`R"x(L', 'Password123LOL!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaapnbggv' => 'ZD7<t,=B&_l?#u:K$!f*', 'Password123LOL!aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabdiappm' => 'K6G_hA21;kKX$ 4?!z6.', ]; $i = 1000; foreach ($passwords as $long => $short) { $s = random_bytes(16); $h1 = hash_pbkdf2('sha1', $long, $s, $i); $h2 = hash_pbkdf2('sha1', $short, $s, $i); var_dump(hash_equals($h1, $h2)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 31
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 31
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/RROMo
function name:  (null)
number of ops:  33
compiled vars:  !0 = $passwords, !1 = $i, !2 = $short, !3 = $long, !4 = $s, !5 = $h1, !6 = $h2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 1000
   10     2      > FE_RESET_R                                       $9      !0, ->31
          3    > > FE_FETCH_R                                       ~10     $9, !2, ->31
          4    >   ASSIGN                                                   !3, ~10
   11     5        INIT_FCALL                                               'random_bytes'
          6        SEND_VAL                                                 16
          7        DO_ICALL                                         $12     
          8        ASSIGN                                                   !4, $12
   12     9        INIT_FCALL                                               'hash_pbkdf2'
         10        SEND_VAL                                                 'sha1'
         11        SEND_VAR                                                 !3
         12        SEND_VAR                                                 !4
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $14     
         15        ASSIGN                                                   !5, $14
   13    16        INIT_FCALL                                               'hash_pbkdf2'
         17        SEND_VAL                                                 'sha1'
         18        SEND_VAR                                                 !2
         19        SEND_VAR                                                 !4
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $16     
         22        ASSIGN                                                   !6, $16
   14    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'hash_equals'
         25        SEND_VAR                                                 !5
         26        SEND_VAR                                                 !6
         27        DO_ICALL                                         $18     
         28        SEND_VAR                                                 $18
         29        DO_ICALL                                                 
   10    30      > JMP                                                      ->3
         31    >   FE_FREE                                                  $9
   15    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.16 ms | 1463 KiB | 17 Q