3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_encrypt($in, $key) { $outText = ''; // Iterate through each character for($i=0;$i<strlen($in);$i++) { $outText .= $in[$i] ^ $key[$i % strlen($key)]; } return $outText; } $b64_decoded_cookie = base64_decode("ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw%3D"); $defaultdata = array( "showpassword"=>"no", "bgcolor"=>"#ffffff"); $key = xor_encrypt(json_encode($defaultdata), $b64_decoded_cookie); echo $key; //echo $my_data_e; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vAfmb
function name:  (null)
number of ops:  15
compiled vars:  !0 = $b64_decoded_cookie, !1 = $defaultdata, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'base64_decode'
          1        SEND_VAL                                                 'ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw%253D'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
   16     4        ASSIGN                                                   !1, <array>
   18     5        INIT_FCALL                                               'xor_encrypt'
          6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !2, $7
   19    13        ECHO                                                     !2
   23    14      > RETURN                                                   1

Function xor_encrypt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
Branch analysis from position: 5
filename:       /in/vAfmb
function name:  xor_encrypt
number of ops:  17
compiled vars:  !0 = $in, !1 = $key, !2 = $outText, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, ''
    7     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->12
    8     5    >   FETCH_DIM_R                                      ~6      !0, !3
          6        STRLEN                                           ~7      !1
          7        MOD                                              ~8      !3, ~7
          8        FETCH_DIM_R                                      ~9      !1, ~8
          9        BW_XOR                                           ~10     ~6, ~9
         10        ASSIGN_OP                                     8          !2, ~10
    7    11        PRE_INC                                                  !3
         12    >   STRLEN                                           ~13     !0
         13        IS_SMALLER                                               !3, ~13
         14      > JMPNZ                                                    ~14, ->5
   11    15    > > RETURN                                                   !2
   12    16*     > RETURN                                                   null

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.62 ms | 1399 KiB | 18 Q