3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'payload'; $key = 'secret_salt'; $sha256_binary = hash('sha256', $data, TRUE); $sha256 = hash('sha256', $data); $md5_binary = hash('md5', $data, TRUE); $md5 = hash('md5', $data); $base64_sha256_binary = base64_encode($sha256_binary); $base64_sha256 = base64_encode($sha256); $drupal_hmac_base64 = str_replace(['+', '/', '='], ['-', '_', ''], $base64_sha256_binary); $sha256_binary_md5 = hash('md5', $sha256_binary); $hash_hmac_sha256 = hash_hmac('sha256', $data, $key); $hash_hmac_sha256_binary = hash_hmac('sha256', $data, $key, TRUE); $xxh64_hash_hmac_sha256 = hash('xxh64', $hash_hmac_sha256); $xxh64_hash_hmac_sha256_binary = hash('xxh64', $hash_hmac_sha256_binary); var_dump([ 'data' => $data, 'sha256_binary' => $sha256_binary, 'sha256' => $sha256, 'md5_binary' => $md5_binary, 'md5' => $md5, 'base64_sha256_binary' => $base64_sha256_binary, 'base64_sha256' => $base64_sha256, 'sha256_binary_md5' => $sha256_binary_md5, 'sha256_binary_bin2hex' => bin2hex($sha256_binary), 'hash_hmac_sha256' => $hash_hmac_sha256, 'hash_hmac_sha256_binary' => $hash_hmac_sha256_binary, 'xxh64_hash_hmac_sha256' => $xxh64_hash_hmac_sha256, 'xxh64_hash_hmac_sha256_binary' => $xxh64_hash_hmac_sha256_binary, 'drupal_hmac_base64' => $drupal_hmac_base64, 'drupal_hmac_base64_md5' => md5($drupal_hmac_base64), ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AEcuN
function name:  (null)
number of ops:  91
compiled vars:  !0 = $data, !1 = $key, !2 = $sha256_binary, !3 = $sha256, !4 = $md5_binary, !5 = $md5, !6 = $base64_sha256_binary, !7 = $base64_sha256, !8 = $drupal_hmac_base64, !9 = $sha256_binary_md5, !10 = $hash_hmac_sha256, !11 = $hash_hmac_sha256_binary, !12 = $xxh64_hash_hmac_sha256, !13 = $xxh64_hash_hmac_sha256_binary
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'payload'
    4     1        ASSIGN                                                   !1, 'secret_salt'
    6     2        INIT_FCALL                                               'hash'
          3        SEND_VAL                                                 'sha256'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $16     
          7        ASSIGN                                                   !2, $16
    7     8        INIT_FCALL                                               'hash'
          9        SEND_VAL                                                 'sha256'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $18     
         12        ASSIGN                                                   !3, $18
    8    13        INIT_FCALL                                               'hash'
         14        SEND_VAL                                                 'md5'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $20     
         18        ASSIGN                                                   !4, $20
    9    19        INIT_FCALL                                               'hash'
         20        SEND_VAL                                                 'md5'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $22     
         23        ASSIGN                                                   !5, $22
   10    24        INIT_FCALL                                               'base64_encode'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $24     
         27        ASSIGN                                                   !6, $24
   11    28        INIT_FCALL                                               'base64_encode'
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                         $26     
         31        ASSIGN                                                   !7, $26
   12    32        INIT_FCALL                                               'str_replace'
         33        SEND_VAL                                                 <array>
         34        SEND_VAL                                                 <array>
         35        SEND_VAR                                                 !6
         36        DO_ICALL                                         $28     
         37        ASSIGN                                                   !8, $28
   13    38        INIT_FCALL                                               'hash'
         39        SEND_VAL                                                 'md5'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                         $30     
         42        ASSIGN                                                   !9, $30
   14    43        INIT_FCALL                                               'hash_hmac'
         44        SEND_VAL                                                 'sha256'
         45        SEND_VAR                                                 !0
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $32     
         48        ASSIGN                                                   !10, $32
   15    49        INIT_FCALL                                               'hash_hmac'
         50        SEND_VAL                                                 'sha256'
         51        SEND_VAR                                                 !0
         52        SEND_VAR                                                 !1
         53        SEND_VAL                                                 <true>
         54        DO_ICALL                                         $34     
         55        ASSIGN                                                   !11, $34
   16    56        INIT_FCALL                                               'hash'
         57        SEND_VAL                                                 'xxh64'
         58        SEND_VAR                                                 !10
         59        DO_ICALL                                         $36     
         60        ASSIGN                                                   !12, $36
   17    61        INIT_FCALL                                               'hash'
         62        SEND_VAL                                                 'xxh64'
         63        SEND_VAR                                                 !11
         64        DO_ICALL                                         $38     
         65        ASSIGN                                                   !13, $38
   19    66        INIT_FCALL                                               'var_dump'
   20    67        INIT_ARRAY                                       ~40     !0, 'data'
   21    68        ADD_ARRAY_ELEMENT                                ~40     !2, 'sha256_binary'
   22    69        ADD_ARRAY_ELEMENT                                ~40     !3, 'sha256'
   23    70        ADD_ARRAY_ELEMENT                                ~40     !4, 'md5_binary'
   24    71        ADD_ARRAY_ELEMENT                                ~40     !5, 'md5'
   25    72        ADD_ARRAY_ELEMENT                                ~40     !6, 'base64_sha256_binary'
   26    73        ADD_ARRAY_ELEMENT                                ~40     !7, 'base64_sha256'
   27    74        ADD_ARRAY_ELEMENT                                ~40     !9, 'sha256_binary_md5'
   28    75        INIT_FCALL                                               'bin2hex'
         76        SEND_VAR                                                 !2
         77        DO_ICALL                                         $41     
         78        ADD_ARRAY_ELEMENT                                ~40     $41, 'sha256_binary_bin2hex'
   29    79        ADD_ARRAY_ELEMENT                                ~40     !10, 'hash_hmac_sha256'
   30    80        ADD_ARRAY_ELEMENT                                ~40     !11, 'hash_hmac_sha256_binary'
   31    81        ADD_ARRAY_ELEMENT                                ~40     !12, 'xxh64_hash_hmac_sha256'
   32    82        ADD_ARRAY_ELEMENT                                ~40     !13, 'xxh64_hash_hmac_sha256_binary'
   33    83        ADD_ARRAY_ELEMENT                                ~40     !8, 'drupal_hmac_base64'
   34    84        INIT_FCALL                                               'md5'
         85        SEND_VAR                                                 !8
         86        DO_ICALL                                         $42     
         87        ADD_ARRAY_ELEMENT                                ~40     $42, 'drupal_hmac_base64_md5'
         88        SEND_VAL                                                 ~40
   19    89        DO_ICALL                                                 
   35    90      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.84 ms | 1013 KiB | 20 Q