3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $connect = new mysqli('localhost', 'username', 'password', 'db_name'); $connect->set_charset('utf8mb4'); // always set the charset if (isset($_POST['user_name'], $_POST['user_pass']) && $_POST['user_login'] == 1) { //Assigning posted values to variables. $username = $_POST['user_name']; $password = $_POST['user_pass']; //Checking the values are existing in the database or not $stmt = $connect->prepare("SELECT user_pass FROM users WHERE user_name=?"); $stmt->bind_param('s', $username); $stmt->execute(); $result = $stmt->get_result(); $user_from_db = $result->fetch_object(); if ($user_from_db && password_verify($password, $user_from_db->user_pass)) { $_SESSION['pageadmin'] = true; $_SESSION['user_name'] = $username; } else { //If the login credentials doesn't match, he will be shown with an error message. echo "Invalid Login Credentials."; } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function mysqli_report() in /in/evQeq:5 Stack trace: #0 {main} thrown in /in/evQeq on line 5
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
162.01 ms | 405 KiB | 5 Q