3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $mysqli = mysqli_connect("mysql.s701.sureserver.com", "userconcurso2", "euskalencounter2017?", "seguridad_consurso2"); /* verificar la conexión */ if ($mysqli->connect_errno) { printf("Conexión fallida: %s\n", $mysqli->connect_error); exit(); } $consulta = "SELECT * FROM `euskal_societe`"; if ($resultado = $mysqli->query($consulta)) { /* obtener un array asociativo */ while ($fila = $resultado->fetch_assoc()) { echo $fila["nom"] . '<br>'; } /* liberar el conjunto de resultados */ $resultado->free(); } /* cerrar la conexión */ $mysqli->close(); ?>
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/rhGlQ:3 Stack trace: #0 {main} thrown in /in/rhGlQ on line 3
Process exited with code 255.
Output for hhvm-3.15.4
Warning: mysql_connect(): Unknown MySQL server host 'mysql.s701.sureserver.com' (111) Notice: Cannot access property on non-object in /in/rhGlQ on line 7 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function query() on a non-object (boolean)' in /in/rhGlQ:14 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function mysqli_connect() in /in/rhGlQ on line 3
Process exited with code 255.