3v4l.org

run code in 300+ PHP versions simultaneously
<?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("chinmay", $con) or die("ERROR"); if(isset($_REQUEST['submit'])){ $name=$_POST['name']; $email=$_POST['email']; $sql=" SELECT * FROM users WHERE fname like '%".$name."%' OR user_email ='%".$email."%'"; $q=mysql_query($sql); } else{ $sql="SELECT * FROM users"; $q=mysql_query($sql); } ?> <form method="post"> <table width="200" border="1"> <tr> <td>Name</td> <td><input type="text" name="name" value="<?php echo $name;?>" /></td> <td>Email</td> <td><input type="text" name="email" value="<?php echo $email;?>" /></td> <td><input type="submit" name="submit" value=" Find " /></td> </tr> </table> </form> <table> <tr> <td>Name</td> <td>Email</td> <td>Address</td> </tr> <?php while($res=mysql_fetch_array($q)){ ?> <tr> <td><?php echo $res['fname'].' '.$res['lname'];?></td> <td><?php echo $res['user_email'];?></td> <td><?php echo $res['address'];?></td> </tr> <?php }?> </table>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 38
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 67, Position 2 = 49
Branch analysis from position: 67
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 67, Position 2 = 49
Branch analysis from position: 67
Branch analysis from position: 49
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 62
Branch analysis from position: 62
filename:       /in/amU4A
function name:  (null)
number of ops:  69
compiled vars:  !0 = $con, !1 = $name, !2 = $email, !3 = $sql, !4 = $q, !5 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        SEND_VAL_EX                                              'localhost'
          2        SEND_VAL_EX                                              'root'
          3        SEND_VAL_EX                                              ''
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !0, $6
    3     6        BOOL_NOT                                         ~8      !0
          7      > JMPZ                                                     ~8, ->12
    5     8    >   INIT_FCALL_BY_NAME                                       'mysql_error'
          9        DO_FCALL                                      0  $9      
         10        CONCAT                                           ~10     'Could+not+connect%3A+', $9
         11      > EXIT                                                     ~10
    7    12    >   INIT_FCALL_BY_NAME                                       'mysql_select_db'
         13        SEND_VAL_EX                                              'chinmay'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $11     
         16      > JMPNZ_EX                                         ~12     $11, ->19
         17    > > EXIT                                                     'ERROR'
         18*       BOOL                                             ~12     <true>
   10    19    >   FETCH_IS                                         ~13     '_REQUEST'
         20        ISSET_ISEMPTY_DIM_OBJ                         0          ~13, 'submit'
         21      > JMPZ                                                     ~14, ->38
   11    22    >   FETCH_R                      global              ~15     '_POST'
         23        FETCH_DIM_R                                      ~16     ~15, 'name'
         24        ASSIGN                                                   !1, ~16
   12    25        FETCH_R                      global              ~18     '_POST'
         26        FETCH_DIM_R                                      ~19     ~18, 'email'
         27        ASSIGN                                                   !2, ~19
   13    28        CONCAT                                           ~21     '+SELECT+%2A+FROM+users+WHERE+fname+like+%27%25', !1
         29        CONCAT                                           ~22     ~21, '%25%27+OR+user_email+%3D%27%25'
         30        CONCAT                                           ~23     ~22, !2
         31        CONCAT                                           ~24     ~23, '%25%27'
         32        ASSIGN                                                   !3, ~24
   14    33        INIT_FCALL_BY_NAME                                       'mysql_query'
         34        SEND_VAR_EX                                              !3
         35        DO_FCALL                                      0  $26     
         36        ASSIGN                                                   !4, $26
         37      > JMP                                                      ->43
   17    38    >   ASSIGN                                                   !3, 'SELECT+%2A+FROM+users'
   18    39        INIT_FCALL_BY_NAME                                       'mysql_query'
         40        SEND_VAR_EX                                              !3
         41        DO_FCALL                                      0  $29     
         42        ASSIGN                                                   !4, $29
   21    43    >   ECHO                                                     '%3Cform+method%3D%22post%22%3E%0A++++%3Ctable+width%3D%22200%22+border%3D%221%22%3E%0A++%3Ctr%3E%0A++++%3Ctd%3EName%3C%2Ftd%3E%0A++++%3Ctd%3E%3Cinput+type%3D%22text%22+name%3D%22name%22+value%3D%22'
   25    44        ECHO                                                     !1
         45        ECHO                                                     '%22+%2F%3E%3C%2Ftd%3E%0A++++%3Ctd%3EEmail%3C%2Ftd%3E%0A++++%3Ctd%3E%3Cinput+type%3D%22text%22+name%3D%22email%22+value%3D%22'
   27    46        ECHO                                                     !2
         47        ECHO                                                     '%22+%2F%3E%3C%2Ftd%3E%0A++++%3Ctd%3E%3Cinput+type%3D%22submit%22+name%3D%22submit%22+value%3D%22+Find+%22+%2F%3E%3C%2Ftd%3E%0A++%3C%2Ftr%3E%0A%3C%2Ftable%3E%0A%3C%2Fform%3E%0A%3Ctable%3E%0A++++%3Ctr%3E%0A++++++++%3Ctd%3EName%3C%2Ftd%3E%0A++++++++%3Ctd%3EEmail%3C%2Ftd%3E%0A++++++++%3Ctd%3EAddress%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++++'
   39    48      > JMP                                                      ->62
   41    49    >   ECHO                                                     '++++%3Ctr%3E%0A++++++++%3Ctd%3E'
   42    50        FETCH_DIM_R                                      ~31     !5, 'fname'
         51        CONCAT                                           ~32     ~31, '+'
         52        FETCH_DIM_R                                      ~33     !5, 'lname'
         53        CONCAT                                           ~34     ~32, ~33
         54        ECHO                                                     ~34
         55        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3Ctd%3E'
   43    56        FETCH_DIM_R                                      ~35     !5, 'user_email'
         57        ECHO                                                     ~35
         58        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3Ctd%3E'
   44    59        FETCH_DIM_R                                      ~36     !5, 'address'
         60        ECHO                                                     ~36
         61        ECHO                                                     '%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A++++'
   39    62    >   INIT_FCALL_BY_NAME                                       'mysql_fetch_array'
         63        SEND_VAR_EX                                              !4
         64        DO_FCALL                                      0  $37     
         65        ASSIGN                                           ~38     !5, $37
         66      > JMPNZ                                                    ~38, ->49
   47    67    >   ECHO                                                     '%3C%2Ftable%3E'
         68      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1399 KiB | 13 Q