3v4l.org

run code in 300+ PHP versions simultaneously
<?php function c2asc($str){ for($i=0;$i<strlen($str);$i++){ $c=substr($str,$i,1); $a=ord($c); $s.='&#'.$a.';'; } return $s; } function xl_encode($content){ $content=c2asc(urlencode($content)); $content=str_replace("&#","",$content); $aryc = explode(';',$content); for($i=0;$i<count($aryc)-1;$i++){ $acont.=$aryc[$i]+67; } $content=$acont; $content=str_replace("14","A",$content); $content=str_replace("15","B",$content); $content=str_replace("16","C",$content); $content=str_replace("17","D",$content); $content=str_replace("18","E",$content); $content=str_replace("19","F",$content); $content=str_replace("20","G",$content); $content=str_replace("21","H",$content); $content=str_replace("22","I",$content); return $content; } //地址解密 function xldecode($content){ $content=str_replace("A","14",$content); $content=str_replace("B","15",$content); $content=str_replace("C","16",$content); $content=str_replace("D","17",$content); $content=str_replace("E","18",$content); $content=str_replace("F","19",$content); $content=str_replace("G","20",$content); $content=str_replace("H","21",$content); $content=str_replace("I","22",$content); $content=str_split($content,3); $arystr = implode(",",$content); $aryc = explode(',',$arystr); for($i=0;$i<count($aryc);$i++){ $acont.=chr($aryc[$i]-67); } $content=urldecode($acont); return $content; } $a = "XODMxNzI4MjQ4"; echo xl_encode($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RCgua
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   ASSIGN                                                   !0, 'XODMxNzI4MjQ4'
   54     1        INIT_FCALL                                               'xl_encode'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function c2asc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
Branch analysis from position: 3
filename:       /in/RCgua
function name:  c2asc
number of ops:  22
compiled vars:  !0 = $str, !1 = $i, !2 = $c, !3 = $a, !4 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->17
    4     3    >   INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
    5     9        INIT_FCALL                                               'ord'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !3, $8
    6    13        CONCAT                                           ~10     '%26%23', !3
         14        CONCAT                                           ~11     ~10, '%3B'
         15        ASSIGN_OP                                     8          !4, ~11
    3    16        PRE_INC                                                  !1
         17    >   STRLEN                                           ~14     !0
         18        IS_SMALLER                                               !1, ~14
         19      > JMPNZ                                                    ~15, ->3
    8    20    > > RETURN                                                   !4
    9    21*     > RETURN                                                   null

End of function c2asc

Function xl_encode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 21
Branch analysis from position: 29
Branch analysis from position: 21
filename:       /in/RCgua
function name:  xl_encode
number of ops:  86
compiled vars:  !0 = $content, !1 = $aryc, !2 = $i, !3 = $acont
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'c2asc'
          2        INIT_FCALL                                               'urlencode'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !0, $5
   13     8        INIT_FCALL                                               'str_replace'
          9        SEND_VAL                                                 '%26%23'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !0, $7
   14    14        INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '%3B'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !1, $9
   15    19        ASSIGN                                                   !2, 0
         20      > JMP                                                      ->25
   16    21    >   FETCH_DIM_R                                      ~12     !1, !2
         22        ADD                                              ~13     ~12, 67
         23        ASSIGN_OP                                     8          !3, ~13
   15    24        PRE_INC                                                  !2
         25    >   COUNT                                            ~16     !1
         26        SUB                                              ~17     ~16, 1
         27        IS_SMALLER                                               !2, ~17
         28      > JMPNZ                                                    ~18, ->21
   18    29    >   ASSIGN                                                   !0, !3
   19    30        INIT_FCALL                                               'str_replace'
         31        SEND_VAL                                                 '14'
         32        SEND_VAL                                                 'A'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $20     
         35        ASSIGN                                                   !0, $20
   20    36        INIT_FCALL                                               'str_replace'
         37        SEND_VAL                                                 '15'
         38        SEND_VAL                                                 'B'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                         $22     
         41        ASSIGN                                                   !0, $22
   21    42        INIT_FCALL                                               'str_replace'
         43        SEND_VAL                                                 '16'
         44        SEND_VAL                                                 'C'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                         $24     
         47        ASSIGN                                                   !0, $24
   22    48        INIT_FCALL                                               'str_replace'
         49        SEND_VAL                                                 '17'
         50        SEND_VAL                                                 'D'
         51        SEND_VAR                                                 !0
         52        DO_ICALL                                         $26     
         53        ASSIGN                                                   !0, $26
   23    54        INIT_FCALL                                               'str_replace'
         55        SEND_VAL                                                 '18'
         56        SEND_VAL                                                 'E'
         57        SEND_VAR                                                 !0
         58        DO_ICALL                                         $28     
         59        ASSIGN                                                   !0, $28
   24    60        INIT_FCALL                                               'str_replace'
         61        SEND_VAL                                                 '19'
         62        SEND_VAL                                                 'F'
         63        SEND_VAR                                                 !0
         64        DO_ICALL                                         $30     
         65        ASSIGN                                                   !0, $30
   25    66        INIT_FCALL                                               'str_replace'
         67        SEND_VAL                                                 '20'
         68        SEND_VAL                                                 'G'
         69        SEND_VAR                                                 !0
         70        DO_ICALL                                         $32     
         71        ASSIGN                                                   !0, $32
   26    72        INIT_FCALL                                               'str_replace'
         73        SEND_VAL                                                 '21'
         74        SEND_VAL                                                 'H'
         75        SEND_VAR                                                 !0
         76        DO_ICALL                                         $34     
         77        ASSIGN                                                   !0, $34
   27    78        INIT_FCALL                                               'str_replace'
         79        SEND_VAL                                                 '22'
         80        SEND_VAL                                                 'I'
         81        SEND_VAR                                                 !0
         82        DO_ICALL                                         $36     
         83        ASSIGN                                                   !0, $36
   28    84      > RETURN                                                   !0
   29    85*     > RETURN                                                   null

End of function xl_encode

Function xldecode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 44) Position 1 = 82, Position 2 = 72
Branch analysis from position: 82
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 82, Position 2 = 72
Branch analysis from position: 82
Branch analysis from position: 72
filename:       /in/RCgua
function name:  xldecode
number of ops:  88
compiled vars:  !0 = $content, !1 = $arystr, !2 = $aryc, !3 = $i, !4 = $acont
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   33     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'A'
          3        SEND_VAL                                                 '14'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !0, $5
   34     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 'B'
          9        SEND_VAL                                                 '15'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !0, $7
   35    13        INIT_FCALL                                               'str_replace'
         14        SEND_VAL                                                 'C'
         15        SEND_VAL                                                 '16'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $9      
         18        ASSIGN                                                   !0, $9
   36    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAL                                                 'D'
         21        SEND_VAL                                                 '17'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $11     
         24        ASSIGN                                                   !0, $11
   37    25        INIT_FCALL                                               'str_replace'
         26        SEND_VAL                                                 'E'
         27        SEND_VAL                                                 '18'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $13     
         30        ASSIGN                                                   !0, $13
   38    31        INIT_FCALL                                               'str_replace'
         32        SEND_VAL                                                 'F'
         33        SEND_VAL                                                 '19'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $15     
         36        ASSIGN                                                   !0, $15
   39    37        INIT_FCALL                                               'str_replace'
         38        SEND_VAL                                                 'G'
         39        SEND_VAL                                                 '20'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $17     
         42        ASSIGN                                                   !0, $17
   40    43        INIT_FCALL                                               'str_replace'
         44        SEND_VAL                                                 'H'
         45        SEND_VAL                                                 '21'
         46        SEND_VAR                                                 !0
         47        DO_ICALL                                         $19     
         48        ASSIGN                                                   !0, $19
   41    49        INIT_FCALL                                               'str_replace'
         50        SEND_VAL                                                 'I'
         51        SEND_VAL                                                 '22'
         52        SEND_VAR                                                 !0
         53        DO_ICALL                                         $21     
         54        ASSIGN                                                   !0, $21
   42    55        INIT_FCALL                                               'str_split'
         56        SEND_VAR                                                 !0
         57        SEND_VAL                                                 3
         58        DO_ICALL                                         $23     
         59        ASSIGN                                                   !0, $23
   43    60        INIT_FCALL                                               'implode'
         61        SEND_VAL                                                 '%2C'
         62        SEND_VAR                                                 !0
         63        DO_ICALL                                         $25     
         64        ASSIGN                                                   !1, $25
   44    65        INIT_FCALL                                               'explode'
         66        SEND_VAL                                                 '%2C'
         67        SEND_VAR                                                 !1
         68        DO_ICALL                                         $27     
         69        ASSIGN                                                   !2, $27
   45    70        ASSIGN                                                   !3, 0
         71      > JMP                                                      ->79
   46    72    >   INIT_FCALL                                               'chr'
         73        FETCH_DIM_R                                      ~30     !2, !3
         74        SUB                                              ~31     ~30, 67
         75        SEND_VAL                                                 ~31
         76        DO_ICALL                                         $32     
         77        ASSIGN_OP                                     8          !4, $32
   45    78        PRE_INC                                                  !3
         79    >   COUNT                                            ~35     !2
         80        IS_SMALLER                                               !3, ~35
         81      > JMPNZ                                                    ~36, ->72
   48    82    >   INIT_FCALL                                               'urldecode'
         83        SEND_VAR                                                 !4
         84        DO_ICALL                                         $37     
         85        ASSIGN                                                   !0, $37
   49    86      > RETURN                                                   !0
   50    87*     > RETURN                                                   null

End of function xldecode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.29 ms | 1406 KiB | 33 Q