3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // Conectando, seleccionando la base de datos $link = _connect('mysql3.000webhost.com', 'a7163469_intern', '11Liburu')or die('No se pudo conectar: ' . _error()); echo 'Connected successfully'; _select_db('a7163469_txanda') or die('No se pudo seleccionar la base de datos'); // Realizar una consulta $query = 'SELECT * FROM Txanda'; $result = _query($query) or die('Consulta fallida: ' . _error()); // Imprimir los resultados en HTML echo "<table>\n"; while ($line = _fetch_array($result, _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 _free_result($result); // Cerrar la conexión _close($link);
based on DNqg9
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function _connect() in /in/mJQa6:3 Stack trace: #0 {main} thrown in /in/mJQa6 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function _connect() in /in/mJQa6 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: _connect() in /in/mJQa6 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: _connect() in /in/mJQa6 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: _connect() in /in/mJQa6 on line 3