3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //login.php $db_hostname = 'localhost'; $db_database = 'edgabbmc_db_practice'; $db_username = 'edgabbmc_db'; $db_password = 'Apple2014!'; // Connect to server. $db_server = mysql_connect($db_hostname, $db_username, $db_password) or die("Unable to connect to MySQL: " . mysql_error()); // Select the database. mysql_select_db($db_database) or die("Unable to select database: " . mysql_error()); ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/Q1Ueb:7 Stack trace: #0 {main} thrown in /in/Q1Ueb on line 7
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) in /in/Q1Ueb on line 7 Unable to connect to MySQL: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
Output for 5.0.0 - 5.6.25
Fatal error: Call to undefined function mysql_connect() in /in/Q1Ueb on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/Q1Ueb on line 7 Unable to connect to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Output for 4.3.0 - 4.3.1
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /in/Q1Ueb on line 7 Unable to connect to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)