3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cc = 'my secret text'; $key = 'my secret key'; $iv = '12345678'; $cipher = mcrypt_module_open(MCRYPT_BLOWFISH,'','cbc',''); mcrypt_generic_init($cipher, $key, $iv); $encrypted = mcrypt_generic($cipher,$cc); $encrypted = base64_encode($encrypted); mcrypt_generic_deinit($cipher); mcrypt_generic_init($cipher, $key, $iv); $decrypted = mdecrypt_generic($cipher, base64_decode($encrypted)); mcrypt_generic_deinit($cipher); echo "encrypted : ".$encrypted; echo "\n"; echo "decrypted : ".$decrypted;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3LmKa
function name:  (null)
number of ops:  50
compiled vars:  !0 = $cc, !1 = $key, !2 = $iv, !3 = $cipher, !4 = $encrypted, !5 = $decrypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'my+secret+text'
    4     1        ASSIGN                                                   !1, 'my+secret+key'
    5     2        ASSIGN                                                   !2, '12345678'
    7     3        INIT_FCALL_BY_NAME                                       'mcrypt_module_open'
          4        FETCH_CONSTANT                                   ~9      'MCRYPT_BLOWFISH'
          5        SEND_VAL_EX                                              ~9
          6        SEND_VAL_EX                                              ''
          7        SEND_VAL_EX                                              'cbc'
          8        SEND_VAL_EX                                              ''
          9        DO_FCALL                                      0  $10     
         10        ASSIGN                                                   !3, $10
    9    11        INIT_FCALL_BY_NAME                                       'mcrypt_generic_init'
         12        SEND_VAR_EX                                              !3
         13        SEND_VAR_EX                                              !1
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
   10    16        INIT_FCALL_BY_NAME                                       'mcrypt_generic'
         17        SEND_VAR_EX                                              !3
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0  $13     
         20        ASSIGN                                                   !4, $13
   11    21        INIT_FCALL                                               'base64_encode'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !4, $15
   12    25        INIT_FCALL_BY_NAME                                       'mcrypt_generic_deinit'
         26        SEND_VAR_EX                                              !3
         27        DO_FCALL                                      0          
   14    28        INIT_FCALL_BY_NAME                                       'mcrypt_generic_init'
         29        SEND_VAR_EX                                              !3
         30        SEND_VAR_EX                                              !1
         31        SEND_VAR_EX                                              !2
         32        DO_FCALL                                      0          
   15    33        INIT_FCALL_BY_NAME                                       'mdecrypt_generic'
         34        SEND_VAR_EX                                              !3
         35        INIT_FCALL                                               'base64_decode'
         36        SEND_VAR                                                 !4
         37        DO_ICALL                                         $19     
         38        SEND_VAR_NO_REF_EX                                       $19
         39        DO_FCALL                                      0  $20     
         40        ASSIGN                                                   !5, $20
   17    41        INIT_FCALL_BY_NAME                                       'mcrypt_generic_deinit'
         42        SEND_VAR_EX                                              !3
         43        DO_FCALL                                      0          
   19    44        CONCAT                                           ~23     'encrypted+%3A+', !4
         45        ECHO                                                     ~23
   20    46        ECHO                                                     '%0A'
   21    47        CONCAT                                           ~24     'decrypted+%3A+', !5
         48        ECHO                                                     ~24
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.61 ms | 1400 KiB | 17 Q