3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Conectando, seleccionando la base de datos $link = mysql_connect('31.170.160.80', 'a7163469_intern', '11Liburu') or die('No se pudo conectar: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('a7163469_txanda') or die('No se pudo seleccionar la base de datos'); // Realizar una consulta MySQL $query = 'SELECT * FROM Txanda'; $result = mysql_query($query) or die('Consulta fallida: ' . mysql_error()); // Imprimir los resultados en HTML echo "<table>\n"; while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "\t<tr>\n"; foreach ($line as $col_value) { echo "\t\t<td>$col_value</td>\n"; } echo "\t</tr>\n"; } echo "</table>\n"; // Liberar resultados mysql_free_result($result); // Cerrar la conexión mysql_close($link); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/oHYtk:3 Stack trace: #0 {main} thrown in /in/oHYtk on line 3
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:
59.9 ms | 401 KiB | 8 Q