3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hA = str_repeat('A', 65); $hB = \hash('sha256', $hA, true); echo $hA . "\n===\n0x" . bin2hex($hB) . "\n\n"; var_dump( hash_hmac('sha256', 'test', $hA) === hash_hmac('sha256', 'test', $hB) ); var_dump( hash_pbkdf2('sha256', $hA, 'test', 10000, 32) === hash_pbkdf2('sha256', $hB, 'test', 10000, 32) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/39uX2
function name:  (null)
number of ops:  51
compiled vars:  !0 = $hA, !1 = $hB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'A'
          2        SEND_VAL                                                 65
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'hash'
          6        SEND_VAL                                                 'sha256'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
    6    11        CONCAT                                           ~6      !0, '%0A%3D%3D%3D%0A0x'
         12        INIT_FCALL                                               'bin2hex'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      ~6, $7
         16        CONCAT                                           ~9      ~8, '%0A%0A'
         17        ECHO                                                     ~9
    7    18        INIT_FCALL                                               'var_dump'
    8    19        INIT_FCALL                                               'hash_hmac'
         20        SEND_VAL                                                 'sha256'
         21        SEND_VAL                                                 'test'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $10     
   10    24        INIT_FCALL                                               'hash_hmac'
         25        SEND_VAL                                                 'sha256'
         26        SEND_VAL                                                 'test'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $11     
         29        IS_IDENTICAL                                     ~12     $10, $11
         30        SEND_VAL                                                 ~12
    7    31        DO_ICALL                                                 
   13    32        INIT_FCALL                                               'var_dump'
   14    33        INIT_FCALL                                               'hash_pbkdf2'
         34        SEND_VAL                                                 'sha256'
         35        SEND_VAR                                                 !0
         36        SEND_VAL                                                 'test'
         37        SEND_VAL                                                 10000
         38        SEND_VAL                                                 32
         39        DO_ICALL                                         $14     
   16    40        INIT_FCALL                                               'hash_pbkdf2'
         41        SEND_VAL                                                 'sha256'
         42        SEND_VAR                                                 !1
         43        SEND_VAL                                                 'test'
         44        SEND_VAL                                                 10000
         45        SEND_VAL                                                 32
         46        DO_ICALL                                         $15     
         47        IS_IDENTICAL                                     ~16     $14, $15
         48        SEND_VAL                                                 ~16
   13    49        DO_ICALL                                                 
   17    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.61 ms | 1021 KiB | 19 Q