3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = "username"; $password = "password"; $companyID = "companyID"; function encodeAES($u, $p, $c){ $original = "$u,$p,$c"; $key = "myKey"; $IV = "00000000"; return rtrim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $original, MCRYPT_MODE_CBC, $IV)), "\0\3"); } print encodeAES($username, $password, $companyID);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NFXoG
function name:  (null)
number of ops:  10
compiled vars:  !0 = $username, !1 = $password, !2 = $companyID
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'username'
    4     1        ASSIGN                                                   !1, 'password'
    5     2        ASSIGN                                                   !2, 'companyID'
   14     3        INIT_FCALL                                               'encodeaes'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_FCALL                                      0  $6      
          8        ECHO                                                     $6
          9      > RETURN                                                   1

Function encodeaes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NFXoG
function name:  encodeAES
number of ops:  29
compiled vars:  !0 = $u, !1 = $p, !2 = $c, !3 = $original, !4 = $key, !5 = $IV
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    8     3        ROPE_INIT                                     5  ~7      !0
          4        ROPE_ADD                                      1  ~7      ~7, '%2C'
          5        ROPE_ADD                                      2  ~7      ~7, !1
          6        ROPE_ADD                                      3  ~7      ~7, '%2C'
          7        ROPE_END                                      4  ~6      ~7, !2
          8        ASSIGN                                                   !3, ~6
    9     9        ASSIGN                                                   !4, 'myKey'
   10    10        ASSIGN                                                   !5, '00000000'
   11    11        INIT_FCALL                                               'rtrim'
         12        INIT_FCALL                                               'base64_encode'
         13        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
         14        FETCH_CONSTANT                                   ~13     'MCRYPT_RIJNDAEL_128'
         15        SEND_VAL_EX                                              ~13
         16        SEND_VAR_EX                                              !4
         17        SEND_VAR_EX                                              !3
         18        FETCH_CONSTANT                                   ~14     'MCRYPT_MODE_CBC'
         19        SEND_VAL_EX                                              ~14
         20        SEND_VAR_EX                                              !5
         21        DO_FCALL                                      0  $15     
         22        SEND_VAR                                                 $15
         23        DO_ICALL                                         $16     
         24        SEND_VAR                                                 $16
         25        SEND_VAL                                                 '%00%03'
         26        DO_ICALL                                         $17     
         27      > RETURN                                                   $17
   12    28*     > RETURN                                                   null

End of function encodeaes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.91 ms | 1394 KiB | 18 Q