3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('SALT', str_pad("$2015", 16)); 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, SALT, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); } $password = "2CzEcwg+YtE4fk2q6+l9Ii5fFXOlctL+vfiDQpOFMK8="; echo decrypt($password);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/82GCq
function name:  (null)
number of ops:  14
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'SALT'
          2        INIT_FCALL                                               'str_pad'
          3        SEND_VAL                                                 '%242015'
          4        SEND_VAL                                                 16
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
   15     8        ASSIGN                                                   !0, '2CzEcwg%2BYtE4fk2q6%2Bl9Ii5fFXOlctL%2BvfiDQpOFMK8%3D'
   16     9        INIT_FCALL                                               'decrypt'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $4      
         12        ECHO                                                     $4
         13      > RETURN                                                   1

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

End of function decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.5 ms | 1394 KiB | 24 Q