3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* *功能:xor算法加密解密功能 */ /* *函数:MyEncrypt($string,$key) *参数:$string明文,$key密钥 *功能:明文加密 *返回:$string密文 */ function MyEncrypt($string,$key) { for($i=0;$i<strlen($string);$i++) { for($j=0;$j<strlen($key);$j++) { $string[$i] = $string[$i]^$key[$j]; } } return $string; } /* * 函数:MyDecrypt($string,$key) * 参数:$string密文,$key密钥 * 功能:密文解密 * 返回:$string明文 */ function MyDecrypt($string,$key) { for($i=0;$i<strlen($string);$i++) { for($j=0;$j<strlen($key);$j++) { $string[$i] = $key[$j]^$string[$i]; } } return $string; } /*Test $a = "123"; $b = "caleng,tcm=Tan Cheng Ming"; echo $a^$b; $Text = '13212313212'; $Key = '1234567890'; echo $Text.'<br><br>'; $Pass_Text = MyEncrypt($Text,$Key); echo $Pass_Text.'<br><br>'; $Dec_Text = MyDecrypt($Pass_Text,$Key); echo $Dec_Text; */ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZkqfJ
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E > > RETURN                                                   1

Function myencrypt:
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 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/ZkqfJ
function name:  MyEncrypt
number of ops:  21
compiled vars:  !0 = $string, !1 = $key, !2 = $i, !3 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->16
   15     4    >   ASSIGN                                                   !3, 0
          5      > JMP                                                      ->12
   17     6    >   FETCH_DIM_R                                      ~7      !0, !2
          7        FETCH_DIM_R                                      ~8      !1, !3
          8        BW_XOR                                           ~9      ~7, ~8
          9        ASSIGN_DIM                                               !0, !2
         10        OP_DATA                                                  ~9
   15    11        PRE_INC                                                  !3
         12    >   STRLEN                                           ~11     !1
         13        IS_SMALLER                                               !3, ~11
         14      > JMPNZ                                                    ~12, ->6
   13    15    >   PRE_INC                                                  !2
         16    >   STRLEN                                           ~14     !0
         17        IS_SMALLER                                               !2, ~14
         18      > JMPNZ                                                    ~15, ->4
   19    19    > > RETURN                                                   !0
   20    20*     > RETURN                                                   null

End of function myencrypt

Function mydecrypt:
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 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/ZkqfJ
function name:  MyDecrypt
number of ops:  21
compiled vars:  !0 = $string, !1 = $key, !2 = $i, !3 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   29     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->16
   31     4    >   ASSIGN                                                   !3, 0
          5      > JMP                                                      ->12
   33     6    >   FETCH_DIM_R                                      ~7      !1, !3
          7        FETCH_DIM_R                                      ~8      !0, !2
          8        BW_XOR                                           ~9      ~7, ~8
          9        ASSIGN_DIM                                               !0, !2
         10        OP_DATA                                                  ~9
   31    11        PRE_INC                                                  !3
         12    >   STRLEN                                           ~11     !1
         13        IS_SMALLER                                               !3, ~11
         14      > JMPNZ                                                    ~12, ->6
   29    15    >   PRE_INC                                                  !2
         16    >   STRLEN                                           ~14     !0
         17        IS_SMALLER                                               !2, ~14
         18      > JMPNZ                                                    ~15, ->4
   36    19    > > RETURN                                                   !0
   37    20*     > RETURN                                                   null

End of function mydecrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.63 ms | 1399 KiB | 13 Q