3v4l.org

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

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

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.46 ms | 1407 KiB | 18 Q