3v4l.org

run code in 300+ PHP versions simultaneously
<? $original = base64_decode('ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSRQsrExIKaAw'); 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/rgJoV
function name:  (null)
number of ops:  11
compiled vars:  !0 = $original
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'base64_decode'
          1        SEND_VAL                                                 'ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSRQsrExIKaAw'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   17     4        INIT_FCALL                                               'base64_encode'
          5        INIT_FCALL                                               'xor_encrypt'
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
   18    10      > 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/rgJoV
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
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    6     4        ASSIGN                                                   !1, 'qw8J'
    7     5        ASSIGN                                                   !2, ''
   10     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->15
   11     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
   10    14        PRE_INC                                                  !3
         15    >   STRLEN                                           ~16     !0
         16        IS_SMALLER                                               !3, ~16
         17      > JMPNZ                                                    ~17, ->8
   14    18    > > RETURN                                                   !2
   15    19*     > RETURN                                                   null

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.41 ms | 944 KiB | 21 Q