3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cipher = openssl_encrypt( 'Yes, it totally does.', 'aes-128-ctr', hash('sha256', 'spottycats', true), OPENSSL_RAW_DATA, str_repeat("\x00", 16) ); $hmac = hash_hmac( 'sha256', $cipher, hash('sha256', 'spottycats', true), true ); echo base64_encode($cipher . $hmac), PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JBkGE
function name:  (null)
number of ops:  37
compiled vars:  !0 = $cipher, !1 = $hmac
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'openssl_encrypt'
    4     1        SEND_VAL_EX                                              'Yes%2C+it+totally+does.'
    5     2        SEND_VAL_EX                                              'aes-128-ctr'
    6     3        INIT_FCALL                                               'hash'
          4        SEND_VAL                                                 'sha256'
          5        SEND_VAL                                                 'spottycats'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $2      
          8        SEND_VAR_NO_REF_EX                                       $2
    7     9        FETCH_CONSTANT                                   ~3      'OPENSSL_RAW_DATA'
         10        SEND_VAL_EX                                              ~3
    8    11        INIT_FCALL                                               'str_repeat'
         12        SEND_VAL                                                 '%00'
         13        SEND_VAL                                                 16
         14        DO_ICALL                                         $4      
         15        SEND_VAR_NO_REF_EX                                       $4
         16        DO_FCALL                                      0  $5      
    3    17        ASSIGN                                                   !0, $5
   10    18        INIT_FCALL                                               'hash_hmac'
   11    19        SEND_VAL                                                 'sha256'
   12    20        SEND_VAR                                                 !0
   13    21        INIT_FCALL                                               'hash'
         22        SEND_VAL                                                 'sha256'
         23        SEND_VAL                                                 'spottycats'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $7      
         26        SEND_VAR                                                 $7
   14    27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $8      
   10    29        ASSIGN                                                   !1, $8
   17    30        INIT_FCALL                                               'base64_encode'
         31        CONCAT                                           ~10     !0, !1
         32        SEND_VAL                                                 ~10
         33        DO_ICALL                                         $11     
         34        ECHO                                                     $11
         35        ECHO                                                     '%0A'
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
211.72 ms | 1396 KiB | 21 Q