3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($text) { return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); } function decrypt($text) { return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, str_pad('$2015', 16), base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } $encryptedmessage = "vbmkp7o9RaIi3ntFjXrgvz+kitP0Po9P5G4vUG+EqUU="; echo decrypt($encryptedmessage);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IClRi
function name:  (null)
number of ops:  6
compiled vars:  !0 = $encryptedmessage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 'vbmkp7o9RaIi3ntFjXrgvz%2BkitP0Po9P5G4vUG%2BEqUU%3D'
   15     1        INIT_FCALL                                               'decrypt'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function encrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IClRi
function name:  encrypt
number of ops:  30
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL                                               'base64_encode'
          3        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
          4        FETCH_CONSTANT                                   ~1      'MCRYPT_RIJNDAEL_256'
          5        SEND_VAL_EX                                              ~1
          6        FETCH_CONSTANT                                   ~2      'SALT'
          7        SEND_VAL_EX                                              ~2
          8        SEND_VAR_EX                                              !0
          9        FETCH_CONSTANT                                   ~3      'MCRYPT_MODE_ECB'
         10        SEND_VAL_EX                                              ~3
         11        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
         12        INIT_FCALL_BY_NAME                                       'mcrypt_get_iv_size'
         13        FETCH_CONSTANT                                   ~4      'MCRYPT_RIJNDAEL_256'
         14        SEND_VAL_EX                                              ~4
         15        FETCH_CONSTANT                                   ~5      'MCRYPT_MODE_ECB'
         16        SEND_VAL_EX                                              ~5
         17        DO_FCALL                                      0  $6      
         18        SEND_VAR_NO_REF_EX                                       $6
         19        FETCH_CONSTANT                                   ~7      'MCRYPT_RAND'
         20        SEND_VAL_EX                                              ~7
         21        DO_FCALL                                      0  $8      
         22        SEND_VAR_NO_REF_EX                                       $8
         23        DO_FCALL                                      0  $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        DO_ICALL                                         $11     
         28      > RETURN                                                   $11
    7    29*     > RETURN                                                   null

End of function encrypt

Function decrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IClRi
function name:  decrypt
number of ops:  33
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'trim'
          2        INIT_FCALL_BY_NAME                                       'mcrypt_decrypt'
          3        FETCH_CONSTANT                                   ~1      'MCRYPT_RIJNDAEL_256'
          4        SEND_VAL_EX                                              ~1
          5        INIT_FCALL                                               'str_pad'
          6        SEND_VAL                                                 '%242015'
          7        SEND_VAL                                                 16
          8        DO_ICALL                                         $2      
          9        SEND_VAR_NO_REF_EX                                       $2
         10        INIT_FCALL                                               'base64_decode'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $3      
         13        SEND_VAR_NO_REF_EX                                       $3
         14        FETCH_CONSTANT                                   ~4      'MCRYPT_MODE_ECB'
         15        SEND_VAL_EX                                              ~4
         16        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
         17        INIT_FCALL_BY_NAME                                       'mcrypt_get_iv_size'
         18        FETCH_CONSTANT                                   ~5      'MCRYPT_RIJNDAEL_256'
         19        SEND_VAL_EX                                              ~5
         20        FETCH_CONSTANT                                   ~6      'MCRYPT_MODE_ECB'
         21        SEND_VAL_EX                                              ~6
         22        DO_FCALL                                      0  $7      
         23        SEND_VAR_NO_REF_EX                                       $7
         24        FETCH_CONSTANT                                   ~8      'MCRYPT_RAND'
         25        SEND_VAL_EX                                              ~8
         26        DO_FCALL                                      0  $9      
         27        SEND_VAR_NO_REF_EX                                       $9
         28        DO_FCALL                                      0  $10     
         29        SEND_VAR                                                 $10
         30        DO_ICALL                                         $11     
         31      > RETURN                                                   $11
   12    32*     > RETURN                                                   null

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.46 ms | 1403 KiB | 22 Q