3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt($str) { $cryptedstr = ""; for ($i =0; $i < strlen($str); $i++) { $temp = ord(substr($str,$i,1)) ^ 192; while(strlen($temp)<3) { $temp = "0".$temp; } $cryptedstr .= $temp. ""; } return base64_encode($cryptedstr); } echo(encrypt("Admin ' and 1 = 1 order by 7 -- ")); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YgVB9
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'encrypt'
          1        SEND_VAL                                                 'Admin+%27+and+1+%3D+1+order+by+7+--+'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   20     4      > RETURN                                                   1

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

End of function encrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.43 ms | 1402 KiB | 20 Q