3v4l.org

run code in 500+ PHP versions simultaneously
<?php function sqli_filter($string) { $filtered_string = $string; $filtered_string = str_replace("--","",$filtered_string); $filtered_string = str_replace(";","",$filtered_string); $filtered_string = str_replace("/*","",$filtered_string); $filtered_string = str_replace("*/","",$filtered_string); $filtered_string = str_replace("//","",$filtered_string); $filtered_string = str_replace(" ","",$filtered_string); $filtered_string = str_replace("#","",$filtered_string); $filtered_string = str_replace("||","",$filtered_string); $filtered_string = str_replace("admin'","",$filtered_string); $filtered_string = str_replace("UNION","",$filtered_string); $filtered_string = str_replace("COLLATE","",$filtered_string); $filtered_string = str_replace("DROP","",$filtered_string); return $filtered_string; } $u = sqli_filter("' union all select password from users where type = 'Admin"); $sql = "SELECT salt FROM users WHERE eid='$u'"; echo $sql;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o8ClJ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $u, !1 = $sql
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                                   'sqli_filter'
          1        SEND_VAL                                                     '%27%09union%09all%09select%09password%09from%09users%09where%09type%09%3D%09%27Admin'
          2        DO_FCALL                                          0  $2      
          3        ASSIGN                                                       !0, $2
   19     4        ROPE_INIT                                         3  ~5      'SELECT+salt+FROM+users+WHERE+eid%3D%27'
          5        ROPE_ADD                                          1  ~5      ~5, !0
          6        ROPE_END                                          2  ~4      ~5, '%27'
          7        ASSIGN                                                       !1, ~4
   20     8        ECHO                                                         !1
   21     9      > RETURN                                                       1

Function sqli_filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o8ClJ
function name:  sqli_filter
number of ops:  40
compiled vars:  !0 = $string, !1 = $filtered_string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        ASSIGN                                                       !1, !0
    4     2        FRAMELESS_ICALL_3                str_replace         ~3      '--', ''
          3        OP_DATA                                                      !1
          4        ASSIGN                                                       !1, ~3
    5     5        FRAMELESS_ICALL_3                str_replace         ~5      '%3B', ''
          6        OP_DATA                                                      !1
          7        ASSIGN                                                       !1, ~5
    6     8        FRAMELESS_ICALL_3                str_replace         ~7      '%2F%2A', ''
          9        OP_DATA                                                      !1
         10        ASSIGN                                                       !1, ~7
    7    11        FRAMELESS_ICALL_3                str_replace         ~9      '%2A%2F', ''
         12        OP_DATA                                                      !1
         13        ASSIGN                                                       !1, ~9
    8    14        FRAMELESS_ICALL_3                str_replace         ~11     '%2F%2F', ''
         15        OP_DATA                                                      !1
         16        ASSIGN                                                       !1, ~11
    9    17        FRAMELESS_ICALL_3                str_replace         ~13     '+', ''
         18        OP_DATA                                                      !1
         19        ASSIGN                                                       !1, ~13
   10    20        FRAMELESS_ICALL_3                str_replace         ~15     '%23', ''
         21        OP_DATA                                                      !1
         22        ASSIGN                                                       !1, ~15
   11    23        FRAMELESS_ICALL_3                str_replace         ~17     '%7C%7C', ''
         24        OP_DATA                                                      !1
         25        ASSIGN                                                       !1, ~17
   12    26        FRAMELESS_ICALL_3                str_replace         ~19     'admin%27', ''
         27        OP_DATA                                                      !1
         28        ASSIGN                                                       !1, ~19
   13    29        FRAMELESS_ICALL_3                str_replace         ~21     'UNION', ''
         30        OP_DATA                                                      !1
         31        ASSIGN                                                       !1, ~21
   14    32        FRAMELESS_ICALL_3                str_replace         ~23     'COLLATE', ''
         33        OP_DATA                                                      !1
         34        ASSIGN                                                       !1, ~23
   15    35        FRAMELESS_ICALL_3                str_replace         ~25     'DROP', ''
         36        OP_DATA                                                      !1
         37        ASSIGN                                                       !1, ~25
   16    38      > RETURN                                                       !1
   17    39*     > RETURN                                                       null

End of function sqli_filter

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.75 ms | 2640 KiB | 14 Q