3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_url_safe_characters = array ( '-', '_', '', ); $_not_url_safe_characters = array ( '+', '/', '=', ); /* Data */ $key = 'this is a very long key, even too long for the cipher'; $encrypted_price = '-cMgOXQks'; $key = '123456789012345678901234'; $str_iv = 'genieeee'; $encrypted_price = str_replace ( $_url_safe_characters, $_not_url_safe_characters, $encrypted_price ); echo 'encrypted_price = '. $encrypted_price, ','; $encrypted_price = base64_decode ( $encrypted_price ); echo 'decodebase64 = '. $encrypted_price, ','; /* Open module, and create IV */ $td = mcrypt_module_open('des', '', 'cfb', ''); /* Initialize encryption handle */ if (mcrypt_generic_init($td, $key, $str_iv) != -1) { /* Encrypt data */ $decrypted_price = mdecrypt_generic($td, $encrypted_price); /* Clean up */ mcrypt_generic_deinit($td); mcrypt_module_close($td); } echo 'decrypted_price = '. floatval($decrypted_price); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 47
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
filename:       /in/pcbjr
function name:  (null)
number of ops:  51
compiled vars:  !0 = $_url_safe_characters, !1 = $_not_url_safe_characters, !2 = $key, !3 = $encrypted_price, !4 = $str_iv, !5 = $td, !6 = $decrypted_price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   15     2        ASSIGN                                                   !2, 'this+is+a+very+long+key%2C+even+too+long+for+the+cipher'
   16     3        ASSIGN                                                   !3, '-cMgOXQks'
   17     4        ASSIGN                                                   !2, '123456789012345678901234'
   18     5        ASSIGN                                                   !4, 'genieeee'
   20     6        INIT_FCALL                                               'str_replace'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !3, $13
   21    12        CONCAT                                           ~15     'encrypted_price+%3D+', !3
         13        ECHO                                                     ~15
         14        ECHO                                                     '%2C'
   22    15        INIT_FCALL                                               'base64_decode'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !3, $16
   23    19        CONCAT                                           ~18     'decodebase64+%3D+', !3
         20        ECHO                                                     ~18
         21        ECHO                                                     '%2C'
   26    22        INIT_FCALL_BY_NAME                                       'mcrypt_module_open'
         23        SEND_VAL_EX                                              'des'
         24        SEND_VAL_EX                                              ''
         25        SEND_VAL_EX                                              'cfb'
         26        SEND_VAL_EX                                              ''
         27        DO_FCALL                                      0  $19     
         28        ASSIGN                                                   !5, $19
   29    29        INIT_FCALL_BY_NAME                                       'mcrypt_generic_init'
         30        SEND_VAR_EX                                              !5
         31        SEND_VAR_EX                                              !2
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0  $21     
         34        IS_NOT_EQUAL                                             $21, -1
         35      > JMPZ                                                     ~22, ->47
   32    36    >   INIT_FCALL_BY_NAME                                       'mdecrypt_generic'
         37        SEND_VAR_EX                                              !5
         38        SEND_VAR_EX                                              !3
         39        DO_FCALL                                      0  $23     
         40        ASSIGN                                                   !6, $23
   34    41        INIT_FCALL_BY_NAME                                       'mcrypt_generic_deinit'
         42        SEND_VAR_EX                                              !5
         43        DO_FCALL                                      0          
   35    44        INIT_FCALL_BY_NAME                                       'mcrypt_module_close'
         45        SEND_VAR_EX                                              !5
         46        DO_FCALL                                      0          
   37    47    >   CAST                                          5  ~27     !6
         48        CONCAT                                           ~28     'decrypted_price+%3D+', ~27
         49        ECHO                                                     ~28
   38    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.47 ms | 1400 KiB | 17 Q