3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $messages = ""; $sqli = mysqli_query($dbc,"SELECT * FROM fox ORDER BY data DESC LIMIT 20"); $i = 0; $productCount = mysqli_num_rows($sqli); if ($productCount > 0) { while($row = mysqli_fetch_array($sqli)){ $id = $row["id"]; $msg_1 = $row['msg_1']; $msg_email = $row['msg_email']; $assunto = $row['assunto']; $mensagem = $row['mensagem']; $data = $row['data']; $size = $row['size']; if (!$size){ echo ' X';} else {echo "<img src='../style/check.jpg' width='20' height='20' />";} if ($i % 2 == 0) { $messages .= ' <tr bgcolor="#f0eded"> <td align="center">' . $msg_1 .'</td> <td align="center">' . $msg_email .'</td> <td align="center">' . $assunto .'</td> <td align="center">' . $mensagem . '</td> <td align="center">' . $data .'</td> <td align="center">' . $size .'</td> <td align="center"><a href="index.php?id=' . $id . '">Respond</a>&nbsp;<b>/</b>&nbsp;<a href="#">Eliminate</a></td> </tr>'; } else { $messages .= ' <tr background-color= "#ffffff"> <td align="center">' . $msg_1 .'</td> <td align="center">' . $msg_email .'</td> <td align="center">' . $assunto .'</td> <td align="center">' . $mensagem . '</td> <td align="center">' . $data .'</td> <td align="center">' . $size .'</td> <td align="center"><a href="index.php?id=' . $id . '"> Respond</a>&nbsp;<b>/</b>&nbsp;<a href="#">Eliminate </a></td> </tr>'; } $i++; } }else{ $messages = "<b>No msg in DB.</b>"; } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysqli_query() in /in/RQGQQ:3 Stack trace: #0 {main} thrown in /in/RQGQQ on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined variable: dbc in /in/RQGQQ on line 3 Catchable fatal error: Argument 1 passed to mysqli_query() must be an instance of mysqli, null given in /in/RQGQQ on line 3
Process exited with code 255.
Output for hhvm-3.10.0
Notice: Undefined variable: dbc in /in/RQGQQ on line 9 Catchable fatal error: Argument 1 passed to mysqli_query() must be an instance of mysqli, null given in /in/RQGQQ on line 8
Process exited with code 255.
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.6.28
Fatal error: Call to undefined function mysqli_query() in /in/RQGQQ on line 3
Process exited with code 255.
Output for 5.0.0 - 5.3.27, 5.4.0 - 5.4.19
Fatal error: Call to undefined function mysqli_query() in /in/M1EgT on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mysqli_query() in /in/M1EgT on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: mysqli_query() in /in/M1EgT on line 3
Process exited with code 255.
Output for 4.3.1
Fatal error: Call to undefined function: mysqli_query() in /in/M1EgT on line 3
Output for 4.3.0
Fatal error: Call to undefined function: mysqli_query() in /in/RQGQQ on line 3