3v4l.org

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

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

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.22 ms | 1403 KiB | 23 Q