3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = hex2bin("002590cd26da"); // Convert the hex string to binary $key = hex2bin("8544e3b47eca58f9583043f8"); // Convert the hex key to binary $hmac = hash_hmac('sha1', $data, $key, true); // Use 'true' to get binary output $hmac_hex = bin2hex($hmac); // Convert the binary HMAC to a hex string echo "HMAC: " . $hmac_hex; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q4rJj
function name:  (null)
number of ops:  22
compiled vars:  !0 = $data, !1 = $key, !2 = $hmac, !3 = $hmac_hex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'hex2bin'
          1        SEND_VAL                                                 '002590cd26da'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        INIT_FCALL                                               'hex2bin'
          5        SEND_VAL                                                 '8544e3b47eca58f9583043f8'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    5     8        INIT_FCALL                                               'hash_hmac'
          9        SEND_VAL                                                 'sha1'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $8      
         14        ASSIGN                                                   !2, $8
    6    15        INIT_FCALL                                               'bin2hex'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !3, $10
    8    19        CONCAT                                           ~12     'HMAC%3A+', !3
         20        ECHO                                                     ~12
    9    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.91 ms | 1012 KiB | 16 Q