3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $con = mysql_connect("localhost","fazia_newadmin","salonspa!@#") or die("Could not Connect");mysql_select_db("fazia_newdb", $con); //$con = mysql_connect("localhost","root","") or die("Could not Connect");//mysql_select_db("salon", $con);extract($_REQUEST);//if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))//{//$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/'; //if (preg_match($regex, $email)) {if($email, FILTER_VALIDATE_EMAIL){ $sql = "select * from user where email_id='$email'"; $rsd = mysql_query($sql); $msg = mysql_num_rows($rsd); //echo $msg; } else { //echo "invalid"; } //echo $msg;//returns 0 if not already exist ?>
based on NpHFh
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/KKiDI:1 Stack trace: #0 {main} thrown in /in/KKiDI on line 1
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/KKiDI on line 1 Could not Connect
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/KKiDI on line 1
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/KKiDI on line 1 Could not Connect
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/KKiDI on line 1 Could not Connect