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($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($email)){ $_SESSION['foutcode'] = 'foutcode 012'; 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/XjOHo:8 Stack trace: #0 {main} thrown in /in/XjOHo 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/XjOHo on line 8
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined function mysql_connect() in /in/XjOHo on line 8
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected 'AND' (T_LOGICAL_AND), expecting ')' in /in/XjOHo on line 22
Process exited with code 255.
Output for 5.2.3 - 5.3.29
Parse error: syntax error, unexpected T_LOGICAL_AND, expecting ')' in /in/XjOHo on line 22
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected T_LOGICAL_AND, expecting ')' in <b>/in/XjOHo</b> on line <b>22</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
<br /> <b>Parse error</b>: parse error, unexpected T_LOGICAL_AND, expecting ')' in <b>/in/XjOHo</b> on line <b>22</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error, expecting `')'' in <b>/in/XjOHo</b> on line <b>22</b><br />
Process exited with code 255.