3v4l.org

run code in 300+ PHP versions simultaneously
<?php function xor_encrypt() { $key = 'qw8J'; $text = json_encode(array("showpassword"=>"yes", "bgcolor"=>"#0000ff")); $outText = ''; for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } echo xor_encrypt(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCntT
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'xor_encrypt'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   19     3      > 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/nCntT
function name:  xor_encrypt
number of ops:  20
compiled vars:  !0 = $key, !1 = $text, !2 = $outText, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'qw8J'
    5     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAL                                                 <array>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    6     5        ASSIGN                                                   !2, ''
    8     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->15
    9     8    >   FETCH_DIM_R                                      ~9      !1, !3
          9        STRLEN                                           ~10     !0
         10        MOD                                              ~11     !3, ~10
         11        FETCH_DIM_R                                      ~12     !0, ~11
         12        BW_XOR                                           ~13     ~9, ~12
         13        ASSIGN_OP                                     8          !2, ~13
    8    14        PRE_INC                                                  !3
         15    >   STRLEN                                           ~16     !1
         16        IS_SMALLER                                               !3, ~16
         17      > JMPNZ                                                    ~17, ->8
   13    18    > > RETURN                                                   !2
   14    19*     > RETURN                                                   null

End of function xor_encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.29 ms | 1399 KiB | 16 Q