3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key="0123456789123456"; $iv = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM); $plain = "id=1"; $res = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plain, "cbc", $iv); //$res = base64_encode($iv.$res); $res = base64_decode($iv.$res); $iv = substr($res,0, 16); $res = substr($res, 16, strlen($res)-16); $res = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $res, "cbc", $iv); $res = str_replace("\x00", "", $res); parse_str($res, $arr); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/42BoK
function name:  (null)
number of ops:  59
compiled vars:  !0 = $key, !1 = $iv, !2 = $plain, !3 = $res, !4 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '0123456789123456'
    3     1        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          2        SEND_VAL_EX                                              16
          3        FETCH_CONSTANT                                   ~6      'MCRYPT_DEV_URANDOM'
          4        SEND_VAL_EX                                              ~6
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
    4     7        ASSIGN                                                   !2, 'id%3D1'
    5     8        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
          9        FETCH_CONSTANT                                   ~10     'MCRYPT_RIJNDAEL_128'
         10        SEND_VAL_EX                                              ~10
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !2
         13        SEND_VAL_EX                                              'cbc'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $11     
         16        ASSIGN                                                   !3, $11
    7    17        INIT_FCALL                                               'base64_decode'
         18        CONCAT                                           ~13     !1, !3
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                         $14     
         21        ASSIGN                                                   !3, $14
    8    22        INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !3
         24        SEND_VAL                                                 0
         25        SEND_VAL                                                 16
         26        DO_ICALL                                         $16     
         27        ASSIGN                                                   !1, $16
    9    28        INIT_FCALL                                               'substr'
         29        SEND_VAR                                                 !3
         30        SEND_VAL                                                 16
         31        STRLEN                                           ~18     !3
         32        SUB                                              ~19     ~18, 16
         33        SEND_VAL                                                 ~19
         34        DO_ICALL                                         $20     
         35        ASSIGN                                                   !3, $20
   10    36        INIT_FCALL_BY_NAME                                       'mcrypt_decrypt'
         37        FETCH_CONSTANT                                   ~22     'MCRYPT_RIJNDAEL_128'
         38        SEND_VAL_EX                                              ~22
         39        SEND_VAR_EX                                              !0
         40        SEND_VAR_EX                                              !3
         41        SEND_VAL_EX                                              'cbc'
         42        SEND_VAR_EX                                              !1
         43        DO_FCALL                                      0  $23     
         44        ASSIGN                                                   !3, $23
   11    45        INIT_FCALL                                               'str_replace'
         46        SEND_VAL                                                 '%00'
         47        SEND_VAL                                                 ''
         48        SEND_VAR                                                 !3
         49        DO_ICALL                                         $25     
         50        ASSIGN                                                   !3, $25
   12    51        INIT_FCALL                                               'parse_str'
         52        SEND_VAR                                                 !3
         53        SEND_REF                                                 !4
         54        DO_ICALL                                                 
   13    55        INIT_FCALL                                               'var_dump'
         56        SEND_VAR                                                 !4
         57        DO_ICALL                                                 
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.93 ms | 1400 KiB | 23 Q