3v4l.org

run code in 300+ PHP versions simultaneously
<?php $good_mac = hex2bin("0b12ae50aa4be68973372730489521f8cf77972a73b0e8c86fde8d97eaa84f02"); $bad_mac = hex2bin("0b12ae5000000000000000000000000000000000000000000000000000000000"); $hmac_key = random_bytes(32); var_dump( hash_hmac('sha256', $good_mac, $hmac_key), hash_hmac('sha256', $bad_mac, $hmac_key), hash_hmac('sha256', $good_mac, $hmac_key) === hash_hmac('sha256', $bad_mac, $hmac_key) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n9qu8
function name:  (null)
number of ops:  39
compiled vars:  !0 = $good_mac, !1 = $bad_mac, !2 = $hmac_key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'hex2bin'
          1        SEND_VAL                                                 '0b12ae50aa4be68973372730489521f8cf77972a73b0e8c86fde8d97eaa84f02'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'hex2bin'
          5        SEND_VAL                                                 '0b12ae5000000000000000000000000000000000000000000000000000000000'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    6     8        INIT_FCALL                                               'random_bytes'
          9        SEND_VAL                                                 32
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    8    12        INIT_FCALL                                               'var_dump'
    9    13        INIT_FCALL                                               'hash_hmac'
         14        SEND_VAL                                                 'sha256'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
   10    19        INIT_FCALL                                               'hash_hmac'
         20        SEND_VAL                                                 'sha256'
         21        SEND_VAR                                                 !1
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $10     
         24        SEND_VAR                                                 $10
   11    25        INIT_FCALL                                               'hash_hmac'
         26        SEND_VAL                                                 'sha256'
         27        SEND_VAR                                                 !0
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                         $11     
         30        INIT_FCALL                                               'hash_hmac'
         31        SEND_VAL                                                 'sha256'
         32        SEND_VAR                                                 !1
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                         $12     
         35        IS_IDENTICAL                                     ~13     $11, $12
         36        SEND_VAL                                                 ~13
         37        DO_ICALL                                                 
   12    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.43 ms | 1396 KiB | 21 Q