3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'Message'; $secret = 'secret'; $hash1 = hash_hmac('sha256', $message, $secret, true); $encoded1 = base64_encode($hash1); $hash2 = base64_decode($hash1); //$hash2 = hash_hmac('sha256', $message, $secret, true); //$encoded2 = base64_encode($hash2); var_dump(hash_equals($hash1, $hash2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5LpT
function name:  (null)
number of ops:  25
compiled vars:  !0 = $message, !1 = $secret, !2 = $hash1, !3 = $encoded1, !4 = $hash2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Message'
    3     1        ASSIGN                                                   !1, 'secret'
    5     2        INIT_FCALL                                               'hash_hmac'
          3        SEND_VAL                                                 'sha256'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    6     9        INIT_FCALL                                               'base64_encode'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !3, $9
    8    13        INIT_FCALL                                               'base64_decode'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !4, $11
   13    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'hash_equals'
         19        SEND_VAR                                                 !2
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.2 ms | 1395 KiB | 23 Q