3v4l.org

run code in 300+ PHP versions simultaneously
<?php require 'path/to/login_utils.php'; $username = $_POST['username']; // NO "custom cleaning function from login_utils" should be ever used here $userpass = $_POST['userpass']; $pdo = connect_to_database(); // custom connection function from login_utils $select = "SELECT `password` FROM `tbl_login` WHERE `username`=:username;"; $prepared = $conn->prepare($select); $prepared->execute([$username]); $result = $prepared->fetch(PDO::FETCH_ASSOC); if ($result && password_verify($userpass, $password)) { start_authenticated_session(); // custom session starting function from login_utils echo 'You have been logged in'; } die ('Invalid username and password combo');
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require(): open_basedir restriction in effect. File(path/to/login_utils.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/jT1Gr on line 3 Warning: require(path/to/login_utils.php): Failed to open stream: Operation not permitted in /in/jT1Gr on line 3 Fatal error: Uncaught Error: Failed opening required 'path/to/login_utils.php' (include_path='.:') in /in/jT1Gr:3 Stack trace: #0 {main} thrown in /in/jT1Gr on line 3
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:
141.2 ms | 406 KiB | 5 Q