3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "secret"; $key = hash('sha512', 'The insecure key', 1); echo base64_encode(mcrypt_encrypt('MCRYPT_RIJNDAEL_256', $key, $string, MCRYPT_MODE_CBC));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/og5Cp
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'secret'
    4     1        INIT_FCALL                                               'hash'
          2        SEND_VAL                                                 'sha512'
          3        SEND_VAL                                                 'The+insecure+key'
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    5     7        INIT_FCALL                                               'base64_encode'
          8        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
          9        SEND_VAL_EX                                              'MCRYPT_RIJNDAEL_256'
         10        SEND_VAR_EX                                              !1
         11        SEND_VAR_EX                                              !0
         12        FETCH_CONSTANT                                   ~5      'MCRYPT_MODE_CBC'
         13        SEND_VAL_EX                                              ~5
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $7      
         17        ECHO                                                     $7
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.86 ms | 1394 KiB | 17 Q