3v4l.org

run code in 500+ PHP versions simultaneously
<?php $db = mysqli_connect('localhost','root','','DBsito'); if (!$db) { die('Could not connect to database: ' . mysqli_error()); } $db_select = mysqli_select_db($db, 'DBsito'); session_start(); $username = $_SESSION['username']; $categorie = mysqli_query($db, "SELECT * FROM categoria WHERE BINARY categoria.user_utente = BINARY '$username'"); /* fetch associative array */ while ($row = mysqli_fetch_assoc($categorie)) { echo ' <a href="categoria.php?categoria='.urlencode($row["categoria"]).'"> <li class="list-item"><img class="card-icone" shadow-lg p-3 mb-5 src="img/upload/'. $row["icona"] . '" &nbsp; > </li> </a>'; } ?> <script type="text/javascript" src="js/home.js"> </script>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 34
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 34
Branch analysis from position: 49
Branch analysis from position: 34
filename:       /in/hvFRk
function name:  (null)
number of ops:  51
compiled vars:  !0 = $db, !1 = $db_select, !2 = $username, !3 = $categorie, !4 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                           'mysqli_connect'
          1        SEND_VAL_EX                                                  'localhost'
          2        SEND_VAL_EX                                                  'root'
          3        SEND_VAL_EX                                                  ''
          4        SEND_VAL_EX                                                  'DBsito'
          5        DO_FCALL                                          0  $5      
          6        ASSIGN                                                       !0, $5
    3     7        BOOL_NOT                                             ~7      !0
          8      > JMPZ                                                         ~7, ->15
    5     9    > > INIT_FCALL                                                   'exit'
         10*       INIT_FCALL_BY_NAME                                           'mysqli_error'
         11*       DO_FCALL                                          0  $8      
         12*       CONCAT                                               ~9      'Could+not+connect+to+database%3A+', $8
         13*       SEND_VAL                                                     ~9
         14*       DO_ICALL                                                     
    8    15    >   INIT_FCALL_BY_NAME                                           'mysqli_select_db'
         16        SEND_VAR_EX                                                  !0
         17        SEND_VAL_EX                                                  'DBsito'
         18        DO_FCALL                                          0  $11     
         19        ASSIGN                                                       !1, $11
    9    20        INIT_FCALL                                                   'session_start'
         21        DO_ICALL                                                     
   10    22        FETCH_R                          global              ~14     '_SESSION'
         23        FETCH_DIM_R                                          ~15     ~14, 'username'
         24        ASSIGN                                                       !2, ~15
   12    25        INIT_FCALL_BY_NAME                                           'mysqli_query'
         26        SEND_VAR_EX                                                  !0
         27        ROPE_INIT                                         3  ~18     'SELECT+%2A+FROM+categoria+WHERE+BINARY+categoria.user_utente+%3D+BINARY+%27'
         28        ROPE_ADD                                          1  ~18     ~18, !2
         29        ROPE_END                                          2  ~17     ~18, '%27'
         30        SEND_VAL_EX                                                  ~17
         31        DO_FCALL                                          0  $20     
         32        ASSIGN                                                       !3, $20
   16    33      > JMP                                                          ->44
   19    34    >   INIT_FCALL                                                   'urlencode'
         35        FETCH_DIM_R                                          ~22     !4, 'categoria'
         36        SEND_VAL                                                     ~22
         37        DO_ICALL                                             $23     
         38        CONCAT                                               ~24     '%0A++++++++++++%3Ca+href%3D%22categoria.php%3Fcategoria%3D', $23
         39        CONCAT                                               ~25     ~24, '%22%3E%0A++++++++++++%3Cli+class%3D%22list-item%22%3E%3Cimg+class%3D%22card-icone%22+shadow-lg+p-3+mb-5+src%3D%22img%2Fupload%2F'
   20    40        FETCH_DIM_R                                          ~26     !4, 'icona'
         41        CONCAT                                               ~27     ~25, ~26
         42        CONCAT                                               ~28     ~27, '%22+%26nbsp%3B++%3E%0A++++++++++++%3C%2Fli%3E%0A++++++++++++%3C%2Fa%3E'
         43        ECHO                                                         ~28
   16    44    >   INIT_FCALL_BY_NAME                                           'mysqli_fetch_assoc'
         45        SEND_VAR_EX                                                  !3
         46        DO_FCALL                                          0  $29     
         47        ASSIGN                                               ~30     !4, $29
         48      > JMPNZ                                                        ~30, ->34
   25    49    >   ECHO                                                         '++++++++++++++%3Cscript+type%3D%22text%2Fjavascript%22+src%3D%22js%2Fhome.js%22%3E%0A++++++++++++++%3C%2Fscript%3E'
   26    50      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.1 ms | 2050 KiB | 16 Q