3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'Message'; $secret = 'secret'; $hash1 = hash_hmac('sha256', $message, $secret, true); $encoded1 = base64_encode($hash2); $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/65FYb
function name:  (null)
number of ops:  32
compiled vars:  !0 = $message, !1 = $secret, !2 = $hash1, !3 = $encoded1, !4 = $hash2, !5 = $encoded2
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                                         $8      
          8        ASSIGN                                                   !2, $8
    6     9        INIT_FCALL                                               'base64_encode'
         10        SEND_VAR                                                 !4
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !3, $10
    8    13        INIT_FCALL                                               'hash_hmac'
         14        SEND_VAL                                                 'sha256'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !4, $12
    9    20        INIT_FCALL                                               'base64_encode'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                         $14     
         23        ASSIGN                                                   !5, $14
   11    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'hash_equals'
         26        SEND_VAR                                                 !2
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $16     
         29        SEND_VAR                                                 $16
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.41 ms | 1396 KiB | 21 Q