3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.29 ms | 1400 KiB | 25 Q