3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /*2014 JMH*/ header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-type: application/json;charset=utf-8'); define("HOST","localhost"); define("USER","root"); define("PASSWORD","200lbq42lI"); define("DB","gts"); $con = new mysqli(HOST,USER,PASSWORD,DB); $con->set_charset("utf8"); if (!$con) { die('Could not connect: ' . mysqli_error()); } $b = mysqli_real_escape_string($con,$_POST['bruker']); $p = mysqli_real_escape_string(($con,$_POST['password']); $sql= "SELECT Account.accountID , User.accountID, Account.password, User.userID, User.password from Account, User WHERE Account.accountID ='basic' AND User.accountID='basic' AND Ac$ AND User.userID='$b' AND User.password='$p'"; $result = $con->query($sql); if($result->num_rows >0) { echo 'true'; } else { echo 'false'; } $con->close(); ?>
based on cfTDM
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.32
Parse error: syntax error, unexpected ',' in /in/XDq72 on line 21
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
Parse error: parse error, unexpected ',' in /in/XDq72 on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/XDq72 on line 21
Process exited with code 255.