3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $con=mysqli_connect("db4free.net","thesis","tribiana7584913","library"); $password = $_POST["password"]; $username = $_POST["username"]; $statement = mysqli_prepare($con, "SELECT * FROM user_tbl where user_name = ? AND password = ? AND account_ID in (1,2) and status = 'Active'"); mysqli_stmt_bind_param($statement, "ss", $username,$password); mysqli_stmt_execute($statement); mysqli_stmt_store_result($statement); mysqli_stmt_bind_result($statement,$userID,$username,$password,$emailadd,$accountID,$status); $user = array(); while(mysqli_stmt_fetch($statement)){ $user[userID] = $userID; $user[username] = $username; $user[password] = $password; $user[emailadd] = $emailadd; $user[accountID] = $accountID; } echo json_encode($user); mysqli_stmt_close($statement); mysqli_close($con); ?>
based on 3sTvM
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /in/aN1IE:2 Stack trace: #0 {main} thrown in /in/aN1IE on line 2
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Call to undefined function mysqli_connect() in /in/aN1IE on line 2
Process exited with code 255.