3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $db = array( 'host' => 'mysql.hostinger.nl', 'user' => 'u126267875_pepe', 'pass' => 'com-puter', 'dbname' => 'u126267875_medal' ); if (!mysql_connect($db['host'], $db['user'], $db['pass'])){ $_SESSION['foutcode'] = 'foutcode 002'; header('location: http://medalwars.url.ph/'); exit(); }elseif (!mysql_select_db($db['dbname'])){ $_SESSION['foutcode'] = 'foutcode 003'; header("location: $before"); exit(); } if($before == 'http://medalwars.url.ph/create_account/'){ if(empty($username) AND empty($password) AND empty($password2) AND empty($email)){ $_SESSION['foutcode'] = 'foutcode 007'; header("location: $before"); exit(); }elseif(empty($username) AND empty($password)){ $_SESSION['foutcode'] = 'foutcode 012'; header("location: $before"); exit(); }elseif(empty($username) AND empty($email)){ $_SESSION['foutcode'] = 'foutcode 013'; header("location: $before"); exit(); }elseif(empty($password) AND empty($email)){ $_SESSION['foutcode'] = 'foutcode 014'; header("location: $before"); exit(); }elseif(empty($username)){ $_SESSION['foutcode'] = 'foutcode 005'; header("location: $before"); exit(); }elseif(empty($password)){ $_SESSION['foutcode'] = 'foutcode 006'; header("location: $before"); exit(); }elseif(empty($password2)){ $_SESSION['foutcode'] = 'foutcode 015'; header("location: $before"); exit(); }elseif(empty($email)){ $_SESSION['foutcode'] = 'foutcode 016'; header("location: $before"); exit(); }elseif($password <> $password2){ $_SESSION['foutcode'] = 'foutcode 017'; header("location: $before"); exit(); }elseif(strlen($username < 6)){ $_SESSION['foutcode'] = 'foutcode 018'; header("location: $before"); exit(); }elseif(strlen($password < 8)){ $_SESSION['foutcode'] = 'foutcode 019'; header("location: $before"); exit(); } }elseif($before == 'http://medalwars.url.ph/'){ if(empty($username) AND empty($password)){ $_SESSION['foutcode'] = 'foutcode 007'; header("location: $before"); exit(); }elseif(empty($username)){ $_SESSION['foutcode'] = 'foutcode 005'; header("location: $before"); exit(); }elseif(empty($password)){ $_SESSION['foutcode'] = 'foutcode 006'; header("location: $before"); exit(); } } ?>
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/9OhRL:8 Stack trace: #0 {main} thrown in /in/9OhRL on line 8
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Warning: mysql_connect(): Unknown MySQL server host 'mysql.hostinger.nl' (111) in /in/9OhRL on line 8
Output for 5.2.3 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/9OhRL on line 8
Process exited with code 255.
Output for 5.0.0 - 5.2.2
<br /> <b>Fatal error</b>: Call to undefined function mysql_connect() in <b>/in/9OhRL</b> on line <b>8</b><br />
Process exited with code 255.
Output for 4.4.3 - 4.4.9
<br /> <b>Warning</b>: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Unknown MySQL Server Host 'mysql.hostinger.nl' (0) in <b>/in/9OhRL</b> on line <b>8</b><br />
Output for 4.3.2 - 4.4.2
<br /> <b>Warning</b>: mysql_connect(): Unknown MySQL Server Host 'mysql.hostinger.nl' (0) in <b>/in/9OhRL</b> on line <b>8</b><br />
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: mysql_connect() [<a href='http://www.php.net/function.mysql-connect'>function.mysql-connect</a>]: Unknown MySQL Server Host 'mysql.hostinger.nl' (0) in <b>/in/9OhRL</b> on line <b>8</b><br />