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,$encrypted); $decrypted = base64_decode($decrypted); 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/j85VQ
function name:  (null)
number of ops:  51
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        SEND_VAR_EX                                              !4
         36        DO_FCALL                                      0  $19     
         37        ASSIGN                                                   !5, $19
   16    38        INIT_FCALL                                               'base64_decode'
         39        SEND_VAR                                                 !5
         40        DO_ICALL                                         $21     
         41        ASSIGN                                                   !5, $21
   17    42        INIT_FCALL_BY_NAME                                       'mcrypt_generic_deinit'
         43        SEND_VAR_EX                                              !3
         44        DO_FCALL                                      0          
   19    45        CONCAT                                           ~24     'encrypted+%3A+', !4
         46        ECHO                                                     ~24
   20    47        ECHO                                                     '%0A'
   21    48        CONCAT                                           ~25     'decrypted+%3A+', !5
         49        ECHO                                                     ~25
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.64 ms | 1400 KiB | 17 Q