3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($_SESSION['logged'] == true) { echo 'Здравейте ' . $username . '<br><br><a href="logout.php">Изход</a>'; } else { if ($_POST) { $username = trim($_POST['username']); $password = $_POST[password]; $get = "SELECT * FROM `users` WHERE username=" . $username . ""; if ($result = mysqli_query($con, $get)) { while ($row = mysqli_fetch_assoc($result)) { $hash = $row['password']; if (password_verify($password, $hash)) { echo 'Valid'; } else { echo 'Invalid'; } } } if ($chek > 0) { $_SESSION['logged'] = $username; echo "Вие влязохте успешно."; echo '<meta http-equiv="refresh" content="1;url=index.php"> '; } else { echo "Грешно потребителско име или парола."; } } } ?>
Output for git.master, git.master_jit
Warning: Undefined global variable $_SESSION in /in/aXool on line 2 Warning: Trying to access array offset on value of type null in /in/aXool on line 2
Output for rfc.property-hooks
Warning: Undefined global variable $_SESSION in /in/aXool on line 2 Warning: Trying to access array offset on null in /in/aXool on line 2

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:
42.89 ms | 401 KiB | 8 Q