3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key="0123456789123456"; $iv = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM); $plain = "id=0"; $res = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plain, "cbc", $iv); $res = base64_encode($iv.$res); print_r($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/4hrHU
function name:  (null)
number of ops:  26
compiled vars:  !0 = $key, !1 = $iv, !2 = $plain, !3 = $res
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                                   ~5      'MCRYPT_DEV_URANDOM'
          4        SEND_VAL_EX                                              ~5
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !1, $6
    4     7        ASSIGN                                                   !2, 'id%3D0'
    5     8        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
          9        FETCH_CONSTANT                                   ~9      'MCRYPT_RIJNDAEL_128'
         10        SEND_VAL_EX                                              ~9
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !2
         13        SEND_VAL_EX                                              'cbc'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $10     
         16        ASSIGN                                                   !3, $10
    6    17        INIT_FCALL                                               'base64_encode'
         18        CONCAT                                           ~12     !1, !3
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !3, $13
    7    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                                 
   14    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.25 ms | 1395 KiB | 17 Q