3v4l.org

run code in 300+ PHP versions simultaneously
<? function xor_encrypt() { $text = json_encode(array( "showpassword"=>"yes", "bgcolor"=>"#ffffff")); $key = "qw8J"; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } print base64_encode(xor_encrypt()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3doUS
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'base64_encode'
          1        INIT_FCALL                                               'xor_encrypt'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
   13     6      > RETURN                                                   1

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

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.64 ms | 1390 KiB | 18 Q