3v4l.org

run code in 300+ PHP versions simultaneously
<?php function base16Encode($arg){ $ret = ''; for($i=0; $i < strlen($arg); $i++){ $tmp = ord(substr($arg, $i, 1)); $ret .= dechex($tmp); } return $ret; } function encrypt($key, $link){ $cp = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'cbc', ''); @mcrypt_generic_init($cp, $key, $key); $enc = mcrypt_generic($cp, $link); mcrypt_generic_deinit($cp); mcrypt_module_close($cp); return $enc; } $key="KEY"; echo $transmitKey = base16Encode($key); echo '\r\n\r\n'; echo base16Encode($transmitKey); $link="URL"; $crypted = base64_encode(encrypt($key, $link)); //echo $crypted;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dseN1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $key, !1 = $transmitKey, !2 = $link, !3 = $crypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ASSIGN                                                   !0, 'KEY'
   24     1        INIT_FCALL                                               'base16encode'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                           ~6      !1, $5
          5        ECHO                                                     ~6
   25     6        ECHO                                                     '%5Cr%5Cn%5Cr%5Cn'
   26     7        INIT_FCALL                                               'base16encode'
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0  $7      
         10        ECHO                                                     $7
   27    11        ASSIGN                                                   !2, 'URL'
   29    12        INIT_FCALL                                               'base64_encode'
         13        INIT_FCALL                                               'encrypt'
         14        SEND_VAR                                                 !0
         15        SEND_VAR                                                 !2
         16        DO_FCALL                                      0  $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !3, $10
   31    20      > RETURN                                                   1

Function base16encode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 4
Branch analysis from position: 21
Branch analysis from position: 4
filename:       /in/dseN1
function name:  base16Encode
number of ops:  23
compiled vars:  !0 = $arg, !1 = $ret, !2 = $i, !3 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->18
    6     4    >   INIT_FCALL                                               'ord'
          5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !2
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !3, $7
    7    13        INIT_FCALL                                               'dechex'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $9      
         16        ASSIGN_OP                                     8          !1, $9
    5    17        PRE_INC                                                  !2
         18    >   STRLEN                                           ~12     !0
         19        IS_SMALLER                                               !2, ~12
         20      > JMPNZ                                                    ~13, ->4
   10    21    > > RETURN                                                   !1
   11    22*     > RETURN                                                   null

End of function base16encode

Function encrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dseN1
function name:  encrypt
number of ops:  30
compiled vars:  !0 = $key, !1 = $link, !2 = $cp, !3 = $enc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL_BY_NAME                                       'mcrypt_module_open'
          3        FETCH_CONSTANT                                   ~4      'MCRYPT_RIJNDAEL_128'
          4        SEND_VAL_EX                                              ~4
          5        SEND_VAL_EX                                              ''
          6        SEND_VAL_EX                                              'cbc'
          7        SEND_VAL_EX                                              ''
          8        DO_FCALL                                      0  $5      
          9        ASSIGN                                                   !2, $5
   15    10        BEGIN_SILENCE                                    ~7      
         11        INIT_FCALL_BY_NAME                                       'mcrypt_generic_init'
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !0
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
         16        END_SILENCE                                              ~7
   16    17        INIT_FCALL_BY_NAME                                       'mcrypt_generic'
         18        SEND_VAR_EX                                              !2
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0  $9      
         21        ASSIGN                                                   !3, $9
   17    22        INIT_FCALL_BY_NAME                                       'mcrypt_generic_deinit'
         23        SEND_VAR_EX                                              !2
         24        DO_FCALL                                      0          
   18    25        INIT_FCALL_BY_NAME                                       'mcrypt_module_close'
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0          
   20    28      > RETURN                                                   !3
   21    29*     > RETURN                                                   null

End of function encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.09 ms | 1403 KiB | 24 Q