3v4l.org

run code in 300+ PHP versions simultaneously
<?php $random = random_bytes(256); $message = 'hello'; $mac1 = hash_hmac('sha256', $message, $random); $mac2 = hash_hmac('sha256', $message, hash('sha256', $random, true)); var_dump($mac1, $mac2); $mac3 = hash_hmac('sha256', $random, $message); $mac4 = hash_hmac('sha256', $random, hash('sha256', $message, true)); var_dump($mac3, $mac4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/attTi
function name:  (null)
number of ops:  48
compiled vars:  !0 = $random, !1 = $message, !2 = $mac1, !3 = $mac2, !4 = $mac3, !5 = $mac4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'random_bytes'
          1        SEND_VAL                                                 256
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    5     4        ASSIGN                                                   !1, 'hello'
    6     5        INIT_FCALL                                               'hash_hmac'
          6        SEND_VAL                                                 'sha256'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
    7    11        INIT_FCALL                                               'hash_hmac'
         12        SEND_VAL                                                 'sha256'
         13        SEND_VAR                                                 !1
         14        INIT_FCALL                                               'hash'
         15        SEND_VAL                                                 'sha256'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !3, $12
    9    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !2
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
   11    26        INIT_FCALL                                               'hash_hmac'
         27        SEND_VAL                                                 'sha256'
         28        SEND_VAR                                                 !0
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $15     
         31        ASSIGN                                                   !4, $15
   12    32        INIT_FCALL                                               'hash_hmac'
         33        SEND_VAL                                                 'sha256'
         34        SEND_VAR                                                 !0
         35        INIT_FCALL                                               'hash'
         36        SEND_VAL                                                 'sha256'
         37        SEND_VAR                                                 !1
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $17     
         40        SEND_VAR                                                 $17
         41        DO_ICALL                                         $18     
         42        ASSIGN                                                   !5, $18
   14    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !4
         45        SEND_VAR                                                 !5
         46        DO_ICALL                                                 
         47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.69 ms | 1445 KiB | 17 Q