3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $con=mysqli_connect("localhost8080","a3876682_kami","Kawasakizx10r","a3876682_tonikam") or die(mysql_error()); $username = $_POST["username"]; $password = $_POST["password"]; $statement = mysqli_prepare($con, "SELECT * FROM User WHERE username = ? AND password = ?"); mysqli_stmt_bind_param($statement, "ss", $username, $password); mysqli_stmt_execute($statement); mysqli_stmt_store_result($statement); mysqli_stmt_bind_result($statement, $userID, $name, $age, $username, $password); $user = array(); while(mysqli_stmt_fetch($statement)){ $user["name"] = $name; $user["age"] = $age; $user["username"] = $username; $user["password"] = $password; } echo json_encode($user); mysqli_close($con); ?>
based on eeS45
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/VLftL:2 Stack trace: #0 {main} thrown in /in/VLftL on line 2
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function mysqli_connect() in /in/VLftL on line 2
Process exited with code 255.