3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $username = "test"; $password = "test"; $hostname = "192.168.1.10"; $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); echo "Connected to MySQL<br>"; //select a database to work with $selected = mysql_select_db("users",$dbhandle) or die("Could not select examples"); ?>
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/hil4F:6 Stack trace: #0 {main} thrown in /in/hil4F on line 6
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/hil4F on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: mysql_connect(): Can't connect to MySQL server on '192.168.1.10' (101) in /in/hil4F on line 6 Unable to connect to MySQL
Output for 4.3.0 - 4.3.1
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]: Can't connect to MySQL server on '192.168.1.10' (101) in /in/hil4F on line 6 Unable to connect to MySQL