3v4l.org

run code in 300+ 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>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/hvFRk:2 Stack trace: #0 {main} thrown in /in/hvFRk on line 2
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
122.47 ms | 405 KiB | 5 Q