3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!isset($_POST["password"])) { $target = htmlspecialchars($_SERVER['PHP_SELF'] ?? ""); $form = '<html><head><title>testing</title></head><body><form action="'.$target.'" method="post"><input type="password" name="password"></form></body></html>'; echo($form); } else { if ($_POST["password"] === "TestersAndDevs0nly") { session_start(); $_SESSION["logged"] = true; } } ?>
Output for 8.1.34, 8.2.30, 8.3.5 - 8.3.30, 8.4.9 - 8.4.18, 8.5.0 - 8.5.3
<html><head><title>testing</title></head><body><form action="/in/jlrdA" method="post"><input type="password" name="password"></form></body></html>

preferences:
53.42 ms | 587 KiB | 4 Q